From 74440e04e193ecadd77e91ddc67af3110bd5a749 Mon Sep 17 00:00:00 2001 From: Lisianthus-A Date: Fri, 19 Apr 2024 03:52:43 +0000 Subject: [PATCH] Automated deployment: Fri Apr 19 03:52:43 UTC 2024 638a541687d078d821da5828fdb14b7623699101 --- assets/index-0cdb10ff.css | 1 - assets/index-c97acc89.css | 1 + .../{index-25a21858.js => index-d0a87fcd.js} | 112 +++++++++--------- index.html | 4 +- 4 files changed, 59 insertions(+), 59 deletions(-) delete mode 100644 assets/index-0cdb10ff.css create mode 100644 assets/index-c97acc89.css rename assets/{index-25a21858.js => index-d0a87fcd.js} (60%) diff --git a/assets/index-0cdb10ff.css b/assets/index-0cdb10ff.css deleted file mode 100644 index b0c84ff..0000000 --- a/assets/index-0cdb10ff.css +++ /dev/null @@ -1 +0,0 @@ -._app_l55t9_1{height:100vh;display:grid;grid-template-rows:64px 1fr;grid-template-columns:360px 1fr;grid-template-areas:"header header" "sidebar canvas"}._mask_l55t9_9{position:absolute;left:0;top:0;width:100%;height:100%;z-index:2}._toast-root_e69rl_1{position:fixed;width:100%;height:100vh;top:0;left:0;pointer-events:none}._toast_e69rl_1{position:absolute;max-width:204px;left:50%;top:50%;transform:translate(-50%,-50%);word-break:break-all;color:#fff;background-color:#000;opacity:.7;padding:8px 16px;border-radius:8px}._button_118g8_1{position:relative;display:inline-block;padding:0 16px;min-width:84px;height:40px;line-height:40px;border-radius:8px;border:1px solid transparent;text-align:center;user-select:none;cursor:pointer;transition:all .3s}._button_118g8_1:active{opacity:.7}._button_118g8_1:after{content:"";display:block;position:absolute;border-radius:8px;left:0;top:0;width:100%;height:100%;opacity:0;transition:all .5s;box-shadow:0 0 0 10px #fff}._button_118g8_1:active:after{box-shadow:0 0 0 0 var(--primary-color);opacity:1;transition:0s}._button-default_118g8_37{border-color:#d9d9d9;color:#1e1e1e}._button-default_118g8_37:hover{border-color:var(--primary-color);color:var(--primary-color)}._button-loading_118g8_46{opacity:.7;cursor:default;pointer-events:none}._button-primary_118g8_52{border-color:var(--primary-color);background-color:var(--primary-color);color:#fff}@keyframes _rotate_118g8_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._loading_118g8_66{margin-right:8px;animation:_rotate_118g8_1 1s linear infinite}._icon_5ds2t_1{display:inline-block;width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}._tips_pdf5z_1{position:absolute;transform:translate(-50%);color:#fff;background-color:#000000b3;height:32px;line-height:32px;font-size:14px;padding:0 12px;border-radius:8px;text-align:center;white-space:nowrap;pointer-events:none;z-index:1}._loading-wrapper_myyfb_1{display:flex;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:var(--size, 96px);height:var(--size, 96px);flex-direction:column;justify-content:center;align-items:center;background-color:#000c;z-index:101;color:#fff;border-radius:16px}._loading_myyfb_1{position:relative;display:block;font-size:0;width:var(--item-size, 32px);height:var(--item-size, 32px)}._loading_myyfb_1:before{content:"";display:inline-block;background-color:currentColor;border:0 solid currentColor;position:absolute;width:100%;height:100%;left:0;top:-25%;z-index:1;border-radius:10%;animation:_square-jelly-box-animate_myyfb_1 .6s -.1s linear infinite}._loading_myyfb_1:after{content:"";display:inline-block;background-color:currentColor;border:0 solid currentColor;position:absolute;width:100%;height:10%;left:0;bottom:-9%;background:#fff;border-radius:50%;opacity:.2;animation:_square-jelly-box-shadow_myyfb_1 .6s -.1s linear infinite}@keyframes _square-jelly-box-animate_myyfb_1{17%{border-bottom-right-radius:10%}25%{transform:translateY(25%) rotate(22.5deg)}50%{border-bottom-right-radius:100%;transform:translateY(50%) scaleY(.9) rotate(45deg)}75%{transform:translateY(25%) rotate(67.5deg)}to{transform:translateY(0) rotate(90deg)}}@keyframes _square-jelly-box-shadow_myyfb_1{50%{transform:scaleX(1.25)}}._overlay_5nitz_1{position:fixed;left:0;top:0;width:100%;height:100%;background-color:#00000080;z-index:102}._modal_5nitz_11{position:absolute;background-color:#fff;width:480px;animation:_fade-in_5nitz_1 .3s forwards}._modal_5nitz_11 .modal-header{position:relative;height:48px;line-height:48px}._modal_5nitz_11 .modal-title{font-size:20px;text-align:center}._modal_5nitz_11 .modal-close-icon{position:absolute;top:12px;right:16px;font-size:24px;cursor:pointer}._modal_5nitz_11 .modal-content{overflow:auto;max-height:640px;padding:16px;border-top:1px solid #ddd;border-bottom:1px solid #ddd}._modal_5nitz_11 .modal-content::-webkit-scrollbar{display:none}._modal_5nitz_11 .modal-footer{display:flex;justify-content:center;padding:16px}@keyframes _fade-in_5nitz_1{0%{transform:translateY(-40px);opacity:0}to{transform:translateY(0);opacity:1}}._select-wrapper_lsl65_1{position:relative}._select_lsl65_1{padding:0 32px 0 12px;width:100%;height:40px;line-height:40px;border:1px solid #e8eaed;border-radius:8px;background:#fff;box-shadow:0 1px 3px -2px #e6e6e6;cursor:pointer;font-family:inherit;font-size:16px;transition:all .15s ease;user-select:none}._select-focus_lsl65_21{outline:0;border-color:var(--primary-color);box-shadow:0 0 0 2px #07f3}._select-focus_lsl65_21+._sprites_lsl65_26{color:var(--primary-color)}._options_lsl65_30{padding:4px;position:absolute;max-height:200px;background-color:#fff;z-index:103;user-select:none;font-size:16px;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;border-radius:8px;overflow:auto}._options_lsl65_30::-webkit-scrollbar{width:8px}._options_lsl65_30::-webkit-scrollbar-thumb{background-color:#aaa;border-radius:4px}._options_lsl65_30::-webkit-scrollbar-thumb:hover{background-color:#666}._option_lsl65_30{padding:0 12px;height:40px;line-height:40px;border-radius:4px;cursor:pointer}._option_lsl65_30:hover{background-color:#e6e6e6}._option-selected_lsl65_66{background-color:#a3c8ff}._option-selected_lsl65_66:hover{background-color:#9cc0f7}._arrow_lsl65_73{position:absolute;top:12px;right:12px;width:16px;height:16px}._input-wrapper_1i4y0_1{position:relative;width:100%}._input_1i4y0_1{padding:0 12px;display:inline-block;height:40px;line-height:40px;width:100%;font-size:16px;border:1px solid #e8eaed;border-radius:8px;outline:0}._input_1i4y0_1:focus{border-color:var(--primary-color);box-shadow:0 0 0 2px #07f3}._input_1i4y0_1::placeholder{font-size:14px}._input_1i4y0_1::-webkit-input-placeholder{font-size:14px}._input_1i4y0_1::-moz-placeholder{font-size:14px}._with-icon_1i4y0_31{padding-right:36px}._icon_1i4y0_35{position:absolute;font-size:24px;top:8px;right:8px;cursor:pointer}._collection-wrapper_lhpqc_1 .collection{margin-top:16px}._collection-wrapper_lhpqc_1 .collection-header{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center;font-size:14px}._collection-wrapper_lhpqc_1 .collection-title{font-weight:600}._collection-wrapper_lhpqc_1 .collection-more{color:#666;cursor:pointer}._collection-wrapper_lhpqc_1 .collection-back{cursor:pointer}._collection-wrapper_lhpqc_1 .collection-items{display:flex;flex-wrap:wrap;justify-content:space-between}._collection-wrapper_lhpqc_1 .collection-item{position:relative;margin-top:8px;padding:8px;width:120px;height:120px;border-radius:8px;background-color:#f9f9f9;transition:all .3s;cursor:pointer;display:flex;justify-content:center;align-items:center;user-select:none}._collection-wrapper_lhpqc_1 .collection-item:hover{background-color:#e6e6e6}._collection-wrapper_lhpqc_1 .collection-item:hover .collection-size{opacity:1}._collection-wrapper_lhpqc_1 .collection-image{display:block;max-width:100px;max-height:90%}._collection-wrapper_lhpqc_1 .collection-name{position:absolute;bottom:0;width:100%;background-color:#0000004d;color:#fff;text-align:center;border-radius:0 0 4px 4px}._collection-wrapper_lhpqc_1 .collection-dropdown{position:absolute;top:8px;right:8px;width:20px;height:20px;display:flex;justify-content:center;align-items:center;border-radius:4px;transition:all .3s}._collection-wrapper_lhpqc_1 .collection-dropdown:hover{background-color:#0003}._collection-wrapper_lhpqc_1 .collection-size{position:absolute;left:8px;top:4px;color:var(--primary-color);opacity:0;transition:all .3s;font-size:12px}._collection-wrapper_lhpqc_1 .no-data{margin-top:64px;color:#666;text-align:center}._tabs_ts0m3_1{position:relative;padding:4px;height:40px;display:flex;align-items:center;justify-content:space-between;background-color:#f6f7f9;border-radius:4px;--tab-offset: 2px}._tab_ts0m3_1{width:100%;text-align:center;z-index:1;cursor:pointer}._tab-slider_ts0m3_20{position:absolute;top:4px;left:var(--tab-offset);width:calc((100% - 8px) / 3);height:calc(100% - 8px);background-color:#fff;box-shadow:0 0 4px #00000014;border-radius:4px;transition:all .3s}@keyframes _move_8cits_1{0%{transform:translate(100%)}50%{transform:translate(0)}to{transform:translate(-100%)}}._inline_8cits_12{display:inline-block;white-space:nowrap;overflow:hidden}._animate_8cits_18{animation:_move_8cits_1 8s linear infinite;animation-delay:-4s}._dropdown_1phsl_1{position:absolute;padding:4px;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;border-radius:8px;background-color:#fff}._option_1phsl_9{position:relative;padding-left:12px;padding-right:28px;height:32px;display:flex;align-items:center;cursor:pointer;border-radius:4px;user-select:none}._option_1phsl_9:hover{background-color:#0003}._icon_1phsl_24{margin-right:4px}._checked_1phsl_28{position:absolute;top:9px;right:4px;color:var(--primary-color)}._switch_6ekqq_1{width:60px;height:32px;border-radius:16px;background-color:#ccc;position:relative;cursor:pointer;transition:all .3s}._switch_6ekqq_1:after{content:"";position:absolute;top:4px;left:4px;width:24px;height:24px;border-radius:12px;background-color:#fff;transition:all .3s}._checked_6ekqq_22{background-color:#7fdb84}._checked_6ekqq_22:after{left:32px}._canvas_eoxbl_1{position:relative;grid-area:canvas;overflow:auto;background-color:#fafafa;scrollbar-width:thin}._canvas_eoxbl_1::-webkit-scrollbar{display:block;width:12px;height:12px}._canvas_eoxbl_1::-webkit-scrollbar-thumb{background-color:#aaa;border-radius:6px}._canvas_eoxbl_1::-webkit-scrollbar-thumb:hover{background-color:#666}._canvas_eoxbl_1 #grid{position:absolute;left:0;top:0;width:1280px;height:720px;background-image:linear-gradient(45deg,#eee 25%,transparent 25%,transparent 75%,#eee 75%),linear-gradient(45deg,#eee 25%,transparent 25%,transparent 75%,#eee 75%);background-size:24px 24px;background-position:0 0,12px 12px;border:1px solid #e6e6e6}._canvas_eoxbl_1 .gap{margin-left:32px;margin-top:32px}._header_1r0jm_1{grid-area:header;padding:0 48px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e6e6e6}._header_1r0jm_1 .header-left{display:flex;align-items:center}._header_1r0jm_1 .title{font-size:18px;font-weight:600}._header_1r0jm_1 .divider{margin:0 16px;width:1px;height:32px;background-color:#e6e6e6}._header_1r0jm_1 .icon-wrapper{margin-right:8px;display:flex;justify-content:center;align-items:center;height:32px;width:32px;border-radius:8px;font-size:16px;cursor:pointer}._header_1r0jm_1 .icon-wrapper:active{background-color:#e6e6e6}._header_1r0jm_1 .hide-input{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;z-index:1;overflow:hidden;cursor:pointer}._save-modal_1r0jm_49 .form-item{margin-bottom:12px}._save-modal_1r0jm_49 .form-field{font-size:16px;margin-bottom:4px}._sidebar_1c5do_1{grid-area:sidebar;display:flex}._tabs_1c5do_6{flex-shrink:0;width:64px;max-height:calc(100vh - 64px);overflow:auto}._tabs_1c5do_6::-webkit-scrollbar{display:none}._tabs_1c5do_6 .tab{position:relative;width:64px;height:64px;display:flex;flex-direction:column;justify-content:center;align-items:center;user-select:none;cursor:pointer}._tabs_1c5do_6 .tab-active,._tabs_1c5do_6 .tab-active .tab-text{color:var(--primary-color)}._tabs_1c5do_6 .tab:hover:after,._tabs_1c5do_6 .tab-active:after{content:"";display:block;position:absolute;left:0;top:16px;width:3px;height:32px;background-color:var(--primary-color)}._tabs_1c5do_6 .tab-icon{width:32px;height:32px}._tabs_1c5do_6 .tab-text{color:#666}._main_1c5do_51{flex-grow:1;border-left:1px solid #e6e6e6;max-height:calc(100vh - 64px);overflow:auto}._main_1c5do_51::-webkit-scrollbar{display:none}._main_1c5do_51 .divider{margin:16px 0;height:1px;background-color:#e6e6e6}._template_190z5_1{padding:16px}._attr_1jnav_1{padding-bottom:16px}._attr_1jnav_1 .empty{text-align:center;color:#666}._attr_1jnav_1 .title{margin-top:16px;padding:0 16px;font-size:16px}._double-input_1nolq_1{margin-top:16px}._double-input_1nolq_1 .name{margin-bottom:8px;padding:0 16px;user-select:none}._double-input_1nolq_1 .wrapper{position:relative;display:flex;justify-content:space-between;padding:0 24px}._double-input_1nolq_1 .controlled-input{outline:0;border:1px solid #a4a4a4;width:112px;height:32px;line-height:30px;padding-left:16px;border-radius:8px}._double-input_1nolq_1 .label-first,._double-input_1nolq_1 .label-second{position:absolute;width:24px;text-align:center;top:6px;font-size:16px;line-height:20px;color:#666;pointer-events:none}._double-input_1nolq_1 .label-first{left:100px}._double-input_1nolq_1 .label-second{right:40px}._upload-image_ozos7_1{margin-top:16px;padding:0 16px}._upload-image_ozos7_1 .button{width:100%}._upload-image_ozos7_1 .hide-input{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;z-index:1;overflow:hidden;cursor:pointer}._range_ibvr5_1{margin-top:16px;user-select:none}._range_ibvr5_1 .header-wrapper{padding:0 16px;display:flex;justify-content:space-between;align-items:center}._range_ibvr5_1 .range-input{outline:0;border:1px solid transparent;width:48px;height:24px;line-height:22px;text-align:center;border-radius:4px}._range_ibvr5_1 .range-input:hover,._range_ibvr5_1 .range-input:focus{border-color:#a4a4a4}._range_ibvr5_1 .progress{--rail-width: 0%;position:relative;margin:16px 16px 0;height:2px;background-color:#e6e6e6;cursor:pointer}._range_ibvr5_1 .rail{position:absolute;left:0;top:0;width:var(--rail-width);height:100%;background-color:var(--primary-color)}._range_ibvr5_1 .handle{position:absolute;top:-5px;right:-6px;width:12px;height:12px;border:1px solid var(--primary-color);border-radius:6px;background-color:#fff}._textarea_1390d_1{margin-top:16px;display:flex;flex-direction:column}._textarea_1390d_1 .name{margin-bottom:8px;padding:0 16px}._textarea_1390d_1 .input-area{margin:0 16px;border:1px solid #e6e6e6;outline:0;min-height:80px;resize:vertical}._color_1llze_1{position:relative;margin-top:16px;display:flex;flex-direction:column}._color_1llze_1 .name{margin-bottom:8px;padding:0 16px;user-select:none}._color_1llze_1 .color-bar-wrapper{position:relative;border-radius:4px;height:24px;margin:0 16px;border:1px solid #e6e6e6;background-image:linear-gradient(45deg,#eee 25%,transparent 25%,transparent 75%,#eee 75%),linear-gradient(45deg,#eee 25%,transparent 25%,transparent 75%,#eee 75%);background-size:8px 8px;background-position:0 0,4px 4px}._color_1llze_1 .color-bar{position:absolute;left:0;top:0;width:100%;height:100%;border-radius:4px;cursor:pointer}._color_1llze_1 .picker-wrapper{position:absolute;top:64px;left:50%;transform:translate(-50%);z-index:1;user-select:none}._icon-bar_1vdkp_1{margin-top:16px}._icon-bar_1vdkp_1 .name{margin-bottom:8px;padding:0 16px;user-select:none}._icon-bar_1vdkp_1 .icon-list{margin:0 16px;padding:8px;border-radius:4px;display:flex;justify-content:space-around;align-items:center;background-color:#f5f5f5}._icon-bar_1vdkp_1 .icon-wrapper{width:32px;height:32px;line-height:32px;text-align:center;border-radius:4px;font-size:20px;cursor:pointer}._icon-bar_1vdkp_1 .icon-wrapper:hover{background-color:#d9d9d9}._icon-bar_1vdkp_1 .icon-active{color:var(--primary-color)}._select_zpj30_1{margin-top:16px;display:flex;flex-direction:column}._select_zpj30_1 .name{margin-bottom:8px;padding:0 16px}._select_zpj30_1 .com-select{padding:0 16px}._material_23e1r_1{padding:16px}._material_23e1r_1 .hide-input{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;z-index:1;overflow:hidden;cursor:pointer}._text_auhaz_1,._my_19yym_1{padding:16px}._my_19yym_1 .tab-bar{display:flex;background-color:#f6f7f9;padding:4px}._my_19yym_1 .types{margin-top:12px;display:flex}._my_19yym_1 .type{margin-right:16px;cursor:pointer}._my_19yym_1 .type-selected{font-weight:600;color:var(--primary-color)}._shape_3s4s4_1 .switch-wrapper{margin:24px 16px;display:flex;align-items:center;justify-content:space-between}:root{--primary-color: #0066ff}body{margin:0;font-size:14px;color:#242424}*{box-sizing:border-box} diff --git a/assets/index-c97acc89.css b/assets/index-c97acc89.css new file mode 100644 index 0000000..b4aa9ee --- /dev/null +++ b/assets/index-c97acc89.css @@ -0,0 +1 @@ +._toast-root_e69rl_1{position:fixed;width:100%;height:100vh;top:0;left:0;pointer-events:none}._toast_e69rl_1{position:absolute;max-width:204px;left:50%;top:50%;transform:translate(-50%,-50%);word-break:break-all;color:#fff;background-color:#000;opacity:.7;padding:8px 16px;border-radius:8px}._button_118g8_1{position:relative;display:inline-block;padding:0 16px;min-width:84px;height:40px;line-height:40px;border-radius:8px;border:1px solid transparent;text-align:center;user-select:none;cursor:pointer;transition:all .3s}._button_118g8_1:active{opacity:.7}._button_118g8_1:after{content:"";display:block;position:absolute;border-radius:8px;left:0;top:0;width:100%;height:100%;opacity:0;transition:all .5s;box-shadow:0 0 0 10px #fff}._button_118g8_1:active:after{box-shadow:0 0 0 0 var(--primary-color);opacity:1;transition:0s}._button-default_118g8_37{border-color:#d9d9d9;color:#1e1e1e}._button-default_118g8_37:hover{border-color:var(--primary-color);color:var(--primary-color)}._button-loading_118g8_46{opacity:.7;cursor:default;pointer-events:none}._button-primary_118g8_52{border-color:var(--primary-color);background-color:var(--primary-color);color:#fff}@keyframes _rotate_118g8_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._loading_118g8_66{margin-right:8px;animation:_rotate_118g8_1 1s linear infinite}._icon_5ds2t_1{display:inline-block;width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}._tips_pdf5z_1{position:absolute;transform:translate(-50%);color:#fff;background-color:#000000b3;height:32px;line-height:32px;font-size:14px;padding:0 12px;border-radius:8px;text-align:center;white-space:nowrap;pointer-events:none;z-index:1}._loading-wrapper_myyfb_1{display:flex;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:var(--size, 96px);height:var(--size, 96px);flex-direction:column;justify-content:center;align-items:center;background-color:#000c;z-index:101;color:#fff;border-radius:16px}._loading_myyfb_1{position:relative;display:block;font-size:0;width:var(--item-size, 32px);height:var(--item-size, 32px)}._loading_myyfb_1:before{content:"";display:inline-block;background-color:currentColor;border:0 solid currentColor;position:absolute;width:100%;height:100%;left:0;top:-25%;z-index:1;border-radius:10%;animation:_square-jelly-box-animate_myyfb_1 .6s -.1s linear infinite}._loading_myyfb_1:after{content:"";display:inline-block;background-color:currentColor;border:0 solid currentColor;position:absolute;width:100%;height:10%;left:0;bottom:-9%;background:#fff;border-radius:50%;opacity:.2;animation:_square-jelly-box-shadow_myyfb_1 .6s -.1s linear infinite}@keyframes _square-jelly-box-animate_myyfb_1{17%{border-bottom-right-radius:10%}25%{transform:translateY(25%) rotate(22.5deg)}50%{border-bottom-right-radius:100%;transform:translateY(50%) scaleY(.9) rotate(45deg)}75%{transform:translateY(25%) rotate(67.5deg)}to{transform:translateY(0) rotate(90deg)}}@keyframes _square-jelly-box-shadow_myyfb_1{50%{transform:scaleX(1.25)}}._overlay_5nitz_1{position:fixed;left:0;top:0;width:100%;height:100%;background-color:#00000080;z-index:102}._modal_5nitz_11{position:absolute;background-color:#fff;width:480px;animation:_fade-in_5nitz_1 .3s forwards}._modal_5nitz_11 .modal-header{position:relative;height:48px;line-height:48px}._modal_5nitz_11 .modal-title{font-size:20px;text-align:center}._modal_5nitz_11 .modal-close-icon{position:absolute;top:12px;right:16px;font-size:24px;cursor:pointer}._modal_5nitz_11 .modal-content{overflow:auto;max-height:640px;padding:16px;border-top:1px solid #ddd;border-bottom:1px solid #ddd}._modal_5nitz_11 .modal-content::-webkit-scrollbar{display:none}._modal_5nitz_11 .modal-footer{display:flex;justify-content:center;padding:16px}@keyframes _fade-in_5nitz_1{0%{transform:translateY(-40px);opacity:0}to{transform:translateY(0);opacity:1}}._select-wrapper_lsl65_1{position:relative}._select_lsl65_1{padding:0 32px 0 12px;width:100%;height:40px;line-height:40px;border:1px solid #e8eaed;border-radius:8px;background:#fff;box-shadow:0 1px 3px -2px #e6e6e6;cursor:pointer;font-family:inherit;font-size:16px;transition:all .15s ease;user-select:none}._select-focus_lsl65_21{outline:0;border-color:var(--primary-color);box-shadow:0 0 0 2px #07f3}._select-focus_lsl65_21+._sprites_lsl65_26{color:var(--primary-color)}._options_lsl65_30{padding:4px;position:absolute;max-height:200px;background-color:#fff;z-index:103;user-select:none;font-size:16px;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;border-radius:8px;overflow:auto}._options_lsl65_30::-webkit-scrollbar{width:8px}._options_lsl65_30::-webkit-scrollbar-thumb{background-color:#aaa;border-radius:4px}._options_lsl65_30::-webkit-scrollbar-thumb:hover{background-color:#666}._option_lsl65_30{padding:0 12px;height:40px;line-height:40px;border-radius:4px;cursor:pointer}._option_lsl65_30:hover{background-color:#e6e6e6}._option-selected_lsl65_66{background-color:#a3c8ff}._option-selected_lsl65_66:hover{background-color:#9cc0f7}._arrow_lsl65_73{position:absolute;top:12px;right:12px;width:16px;height:16px}._input-wrapper_1i4y0_1{position:relative;width:100%}._input_1i4y0_1{padding:0 12px;display:inline-block;height:40px;line-height:40px;width:100%;font-size:16px;border:1px solid #e8eaed;border-radius:8px;outline:0}._input_1i4y0_1:focus{border-color:var(--primary-color);box-shadow:0 0 0 2px #07f3}._input_1i4y0_1::placeholder{font-size:14px}._input_1i4y0_1::-webkit-input-placeholder{font-size:14px}._input_1i4y0_1::-moz-placeholder{font-size:14px}._with-icon_1i4y0_31{padding-right:36px}._icon_1i4y0_35{position:absolute;font-size:24px;top:8px;right:8px;cursor:pointer}._collection-wrapper_lhpqc_1 .collection{margin-top:16px}._collection-wrapper_lhpqc_1 .collection-header{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center;font-size:14px}._collection-wrapper_lhpqc_1 .collection-title{font-weight:600}._collection-wrapper_lhpqc_1 .collection-more{color:#666;cursor:pointer}._collection-wrapper_lhpqc_1 .collection-back{cursor:pointer}._collection-wrapper_lhpqc_1 .collection-items{display:flex;flex-wrap:wrap;justify-content:space-between}._collection-wrapper_lhpqc_1 .collection-item{position:relative;margin-top:8px;padding:8px;width:120px;height:120px;border-radius:8px;background-color:#f9f9f9;transition:all .3s;cursor:pointer;display:flex;justify-content:center;align-items:center;user-select:none}._collection-wrapper_lhpqc_1 .collection-item:hover{background-color:#e6e6e6}._collection-wrapper_lhpqc_1 .collection-item:hover .collection-size{opacity:1}._collection-wrapper_lhpqc_1 .collection-image{display:block;max-width:100px;max-height:90%}._collection-wrapper_lhpqc_1 .collection-name{position:absolute;bottom:0;width:100%;background-color:#0000004d;color:#fff;text-align:center;border-radius:0 0 4px 4px}._collection-wrapper_lhpqc_1 .collection-dropdown{position:absolute;top:8px;right:8px;width:20px;height:20px;display:flex;justify-content:center;align-items:center;border-radius:4px;transition:all .3s}._collection-wrapper_lhpqc_1 .collection-dropdown:hover{background-color:#0003}._collection-wrapper_lhpqc_1 .collection-size{position:absolute;left:8px;top:4px;color:var(--primary-color);opacity:0;transition:all .3s;font-size:12px}._collection-wrapper_lhpqc_1 .no-data{margin-top:64px;color:#666;text-align:center}._tabs_ts0m3_1{position:relative;padding:4px;height:40px;display:flex;align-items:center;justify-content:space-between;background-color:#f6f7f9;border-radius:4px;--tab-offset: 2px}._tab_ts0m3_1{width:100%;text-align:center;z-index:1;cursor:pointer}._tab-slider_ts0m3_20{position:absolute;top:4px;left:var(--tab-offset);width:calc((100% - 8px) / 3);height:calc(100% - 8px);background-color:#fff;box-shadow:0 0 4px #00000014;border-radius:4px;transition:all .3s}@keyframes _move_8cits_1{0%{transform:translate(100%)}50%{transform:translate(0)}to{transform:translate(-100%)}}._inline_8cits_12{display:inline-block;white-space:nowrap;overflow:hidden}._animate_8cits_18{animation:_move_8cits_1 8s linear infinite;animation-delay:-4s}._dropdown_1phsl_1{position:absolute;padding:4px;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;border-radius:8px;background-color:#fff}._option_1phsl_9{position:relative;padding-left:12px;padding-right:28px;height:32px;display:flex;align-items:center;cursor:pointer;border-radius:4px;user-select:none}._option_1phsl_9:hover{background-color:#0003}._icon_1phsl_24{margin-right:4px}._checked_1phsl_28{position:absolute;top:9px;right:4px;color:var(--primary-color)}._switch_6ekqq_1{width:60px;height:32px;border-radius:16px;background-color:#ccc;position:relative;cursor:pointer;transition:all .3s}._switch_6ekqq_1:after{content:"";position:absolute;top:4px;left:4px;width:24px;height:24px;border-radius:12px;background-color:#fff;transition:all .3s}._checked_6ekqq_22{background-color:#7fdb84}._checked_6ekqq_22:after{left:32px}._canvas_eoxbl_1{position:relative;grid-area:canvas;overflow:auto;background-color:#fafafa;scrollbar-width:thin}._canvas_eoxbl_1::-webkit-scrollbar{display:block;width:12px;height:12px}._canvas_eoxbl_1::-webkit-scrollbar-thumb{background-color:#aaa;border-radius:6px}._canvas_eoxbl_1::-webkit-scrollbar-thumb:hover{background-color:#666}._canvas_eoxbl_1 #grid{position:absolute;left:0;top:0;width:1280px;height:720px;background-image:linear-gradient(45deg,#eee 25%,transparent 25%,transparent 75%,#eee 75%),linear-gradient(45deg,#eee 25%,transparent 25%,transparent 75%,#eee 75%);background-size:24px 24px;background-position:0 0,12px 12px;border:1px solid #e6e6e6}._canvas_eoxbl_1 .gap{margin-left:32px;margin-top:32px}._header_1r0jm_1{grid-area:header;padding:0 48px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e6e6e6}._header_1r0jm_1 .header-left{display:flex;align-items:center}._header_1r0jm_1 .title{font-size:18px;font-weight:600}._header_1r0jm_1 .divider{margin:0 16px;width:1px;height:32px;background-color:#e6e6e6}._header_1r0jm_1 .icon-wrapper{margin-right:8px;display:flex;justify-content:center;align-items:center;height:32px;width:32px;border-radius:8px;font-size:16px;cursor:pointer}._header_1r0jm_1 .icon-wrapper:active{background-color:#e6e6e6}._header_1r0jm_1 .hide-input{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;z-index:1;overflow:hidden;cursor:pointer}._save-modal_1r0jm_49 .form-item{margin-bottom:12px}._save-modal_1r0jm_49 .form-field{font-size:16px;margin-bottom:4px}._sidebar_1c5do_1{grid-area:sidebar;display:flex}._tabs_1c5do_6{flex-shrink:0;width:64px;max-height:calc(100vh - 64px);overflow:auto}._tabs_1c5do_6::-webkit-scrollbar{display:none}._tabs_1c5do_6 .tab{position:relative;width:64px;height:64px;display:flex;flex-direction:column;justify-content:center;align-items:center;user-select:none;cursor:pointer}._tabs_1c5do_6 .tab-active,._tabs_1c5do_6 .tab-active .tab-text{color:var(--primary-color)}._tabs_1c5do_6 .tab:hover:after,._tabs_1c5do_6 .tab-active:after{content:"";display:block;position:absolute;left:0;top:16px;width:3px;height:32px;background-color:var(--primary-color)}._tabs_1c5do_6 .tab-icon{width:32px;height:32px}._tabs_1c5do_6 .tab-text{color:#666}._main_1c5do_51{flex-grow:1;border-left:1px solid #e6e6e6;max-height:calc(100vh - 64px);overflow:auto}._main_1c5do_51::-webkit-scrollbar{display:none}._main_1c5do_51 .divider{margin:16px 0;height:1px;background-color:#e6e6e6}._template_190z5_1{padding:16px}._attr_1jnav_1{padding-bottom:16px}._attr_1jnav_1 .empty{text-align:center;color:#666}._attr_1jnav_1 .title{margin-top:16px;padding:0 16px;font-size:16px}._double-input_1nolq_1{margin-top:16px}._double-input_1nolq_1 .name{margin-bottom:8px;padding:0 16px;user-select:none}._double-input_1nolq_1 .wrapper{position:relative;display:flex;justify-content:space-between;padding:0 24px}._double-input_1nolq_1 .controlled-input{outline:0;border:1px solid #a4a4a4;width:112px;height:32px;line-height:30px;padding-left:16px;border-radius:8px}._double-input_1nolq_1 .label-first,._double-input_1nolq_1 .label-second{position:absolute;width:24px;text-align:center;top:6px;font-size:16px;line-height:20px;color:#666;pointer-events:none}._double-input_1nolq_1 .label-first{left:100px}._double-input_1nolq_1 .label-second{right:40px}._upload-image_ozos7_1{margin-top:16px;padding:0 16px}._upload-image_ozos7_1 .button{width:100%}._upload-image_ozos7_1 .hide-input{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;z-index:1;overflow:hidden;cursor:pointer}._range_ibvr5_1{margin-top:16px;user-select:none}._range_ibvr5_1 .header-wrapper{padding:0 16px;display:flex;justify-content:space-between;align-items:center}._range_ibvr5_1 .range-input{outline:0;border:1px solid transparent;width:48px;height:24px;line-height:22px;text-align:center;border-radius:4px}._range_ibvr5_1 .range-input:hover,._range_ibvr5_1 .range-input:focus{border-color:#a4a4a4}._range_ibvr5_1 .progress{--rail-width: 0%;position:relative;margin:16px 16px 0;height:2px;background-color:#e6e6e6;cursor:pointer}._range_ibvr5_1 .rail{position:absolute;left:0;top:0;width:var(--rail-width);height:100%;background-color:var(--primary-color)}._range_ibvr5_1 .handle{position:absolute;top:-5px;right:-6px;width:12px;height:12px;border:1px solid var(--primary-color);border-radius:6px;background-color:#fff}._textarea_1390d_1{margin-top:16px;display:flex;flex-direction:column}._textarea_1390d_1 .name{margin-bottom:8px;padding:0 16px}._textarea_1390d_1 .input-area{margin:0 16px;border:1px solid #e6e6e6;outline:0;min-height:80px;resize:vertical}._color_1llze_1{position:relative;margin-top:16px;display:flex;flex-direction:column}._color_1llze_1 .name{margin-bottom:8px;padding:0 16px;user-select:none}._color_1llze_1 .color-bar-wrapper{position:relative;border-radius:4px;height:24px;margin:0 16px;border:1px solid #e6e6e6;background-image:linear-gradient(45deg,#eee 25%,transparent 25%,transparent 75%,#eee 75%),linear-gradient(45deg,#eee 25%,transparent 25%,transparent 75%,#eee 75%);background-size:8px 8px;background-position:0 0,4px 4px}._color_1llze_1 .color-bar{position:absolute;left:0;top:0;width:100%;height:100%;border-radius:4px;cursor:pointer}._color_1llze_1 .picker-wrapper{position:absolute;top:64px;left:50%;transform:translate(-50%);z-index:1;user-select:none}._icon-bar_1vdkp_1{margin-top:16px}._icon-bar_1vdkp_1 .name{margin-bottom:8px;padding:0 16px;user-select:none}._icon-bar_1vdkp_1 .icon-list{margin:0 16px;padding:8px;border-radius:4px;display:flex;justify-content:space-around;align-items:center;background-color:#f5f5f5}._icon-bar_1vdkp_1 .icon-wrapper{width:32px;height:32px;line-height:32px;text-align:center;border-radius:4px;font-size:20px;cursor:pointer}._icon-bar_1vdkp_1 .icon-wrapper:hover{background-color:#d9d9d9}._icon-bar_1vdkp_1 .icon-active{color:var(--primary-color)}._select_zpj30_1{margin-top:16px;display:flex;flex-direction:column}._select_zpj30_1 .name{margin-bottom:8px;padding:0 16px}._select_zpj30_1 .com-select{padding:0 16px}._material_23e1r_1{padding:16px}._material_23e1r_1 .hide-input{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;z-index:1;overflow:hidden;cursor:pointer}._text_auhaz_1,._my_19yym_1{padding:16px}._my_19yym_1 .tab-bar{display:flex;background-color:#f6f7f9;padding:4px}._my_19yym_1 .types{margin-top:12px;display:flex}._my_19yym_1 .type{margin-right:16px;cursor:pointer}._my_19yym_1 .type-selected{font-weight:600;color:var(--primary-color)}._shape_3s4s4_1 .switch-wrapper{margin:24px 16px;display:flex;align-items:center;justify-content:space-between}._app_l55t9_1{height:100vh;display:grid;grid-template-rows:64px 1fr;grid-template-columns:360px 1fr;grid-template-areas:"header header" "sidebar canvas"}._mask_l55t9_9{position:absolute;left:0;top:0;width:100%;height:100%;z-index:2}:root{--primary-color: #0066ff}body{margin:0;font-size:14px;color:#242424}*{box-sizing:border-box} diff --git a/assets/index-25a21858.js b/assets/index-d0a87fcd.js similarity index 60% rename from assets/index-25a21858.js rename to assets/index-d0a87fcd.js index 795c162..de4bb4e 100644 --- a/assets/index-25a21858.js +++ b/assets/index-d0a87fcd.js @@ -1,4 +1,4 @@ -var fm=Object.defineProperty;var Am=(e,t,n)=>t in e?fm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var dm=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ce=(e,t,n)=>(Am(e,typeof t!="symbol"?t+"":t,n),n);var TL=dm((Et,st)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const d of l)if(d.type==="childList")for(const m of d.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&r(m)}).observe(document,{childList:!0,subtree:!0});function n(l){const d={};return l.integrity&&(d.integrity=l.integrity),l.referrerpolicy&&(d.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?d.credentials="include":l.crossorigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(l){if(l.ep)return;l.ep=!0;const d=n(l);fetch(l.href,d)}})();var Ha=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pm(e){var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var l=[null];l.push.apply(l,arguments);var d=Function.bind.apply(t,l);return new d}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var l=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,l.get?l:{enumerable:!0,get:function(){return e[r]}})}),n}var ou={exports:{}},uo={},K={exports:{}},me={};/** +var fm=Object.defineProperty;var dm=(e,t,n)=>t in e?fm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Am=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ce=(e,t,n)=>(dm(e,typeof t!="symbol"?t+"":t,n),n);var TL=Am((Et,st)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const A of l)if(A.type==="childList")for(const m of A.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&r(m)}).observe(document,{childList:!0,subtree:!0});function n(l){const A={};return l.integrity&&(A.integrity=l.integrity),l.referrerpolicy&&(A.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?A.credentials="include":l.crossorigin==="anonymous"?A.credentials="omit":A.credentials="same-origin",A}function r(l){if(l.ep)return;l.ep=!0;const A=n(l);fetch(l.href,A)}})();var Ya=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pm(e){var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var l=[null];l.push.apply(l,arguments);var A=Function.bind.apply(t,l);return new A}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var l=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,l.get?l:{enumerable:!0,get:function(){return e[r]}})}),n}var ou={exports:{}},ho={},K={exports:{}},me={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var fm=Object.defineProperty;var Am=(e,t,n)=>t in e?fm(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ka=Symbol.for("react.element"),vm=Symbol.for("react.portal"),mm=Symbol.for("react.fragment"),Cm=Symbol.for("react.strict_mode"),ym=Symbol.for("react.profiler"),Em=Symbol.for("react.provider"),wm=Symbol.for("react.context"),Im=Symbol.for("react.forward_ref"),Bm=Symbol.for("react.suspense"),xm=Symbol.for("react.memo"),Sm=Symbol.for("react.lazy"),rf=Symbol.iterator;function bm(e){return e===null||typeof e!="object"?null:(e=rf&&e[rf]||e["@@iterator"],typeof e=="function"?e:null)}var pg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},vg=Object.assign,mg={};function mi(e,t,n){this.props=e,this.context=t,this.refs=mg,this.updater=n||pg}mi.prototype.isReactComponent={};mi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};mi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Cg(){}Cg.prototype=mi.prototype;function lu(e,t,n){this.props=e,this.context=t,this.refs=mg,this.updater=n||pg}var cu=lu.prototype=new Cg;cu.constructor=lu;vg(cu,mi.prototype);cu.isPureReactComponent=!0;var af=Array.isArray,yg=Object.prototype.hasOwnProperty,uu={current:null},Eg={key:!0,ref:!0,__self:!0,__source:!0};function wg(e,t,n){var r,l={},d=null,m=null;if(t!=null)for(r in t.ref!==void 0&&(m=t.ref),t.key!==void 0&&(d=""+t.key),t)yg.call(t,r)&&!Eg.hasOwnProperty(r)&&(l[r]=t[r]);var c=arguments.length-2;if(c===1)l.children=n;else if(1t in e?fm(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Dm=K.exports,Om=Symbol.for("react.element"),Fm=Symbol.for("react.fragment"),Mm=Object.prototype.hasOwnProperty,Pm=Dm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Lm={key:!0,ref:!0,__self:!0,__source:!0};function Ig(e,t,n){var r,l={},d=null,m=null;n!==void 0&&(d=""+n),t.key!==void 0&&(d=""+t.key),t.ref!==void 0&&(m=t.ref);for(r in t)Mm.call(t,r)&&!Lm.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:Om,type:e,key:d,ref:m,props:l,_owner:Pm.current}}uo.Fragment=Fm;uo.jsx=Ig;uo.jsxs=Ig;(function(e){e.exports=uo})(ou);const U=ou.exports.jsx,pe=ou.exports.jsxs;var Qs={},fu={exports:{}},xt={},Bg={exports:{}},xg={};/** + */var Dm=K.exports,Om=Symbol.for("react.element"),Fm=Symbol.for("react.fragment"),Mm=Object.prototype.hasOwnProperty,Pm=Dm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Lm={key:!0,ref:!0,__self:!0,__source:!0};function Ig(e,t,n){var r,l={},A=null,m=null;n!==void 0&&(A=""+n),t.key!==void 0&&(A=""+t.key),t.ref!==void 0&&(m=t.ref);for(r in t)Mm.call(t,r)&&!Lm.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:Om,type:e,key:A,ref:m,props:l,_owner:Pm.current}}ho.Fragment=Fm;ho.jsx=Ig;ho.jsxs=Ig;(function(e){e.exports=ho})(ou);const U=ou.exports.jsx,pe=ou.exports.jsxs;var ks={},fu={exports:{}},xt={},Bg={exports:{}},xg={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var fm=Object.defineProperty;var Am=(e,t,n)=>t in e?fm(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(L,B){var b=L.length;L.push(B);e:for(;0>>1,T=L[Q];if(0>>1;Ql(x,b))Ol(F,x)?(L[Q]=F,L[O]=b,Q=O):(L[Q]=x,L[_]=b,Q=_);else if(Ol(F,b))L[Q]=F,L[O]=b,Q=O;else break e}}return B}function l(L,B){var b=L.sortIndex-B.sortIndex;return b!==0?b:L.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;e.unstable_now=function(){return d.now()}}else{var m=Date,c=m.now();e.unstable_now=function(){return m.now()-c}}var i=[],h=[],A=1,a=null,o=3,s=!1,u=!1,g=!1,f=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(L){for(var B=n(h);B!==null;){if(B.callback===null)r(h);else if(B.startTime<=L)r(h),B.sortIndex=B.expirationTime,t(i,B);else break;B=n(h)}}function y(L){if(g=!1,C(L),!u)if(n(i)!==null)u=!0,oe(E);else{var B=n(h);B!==null&&H(y,B.startTime-L)}}function E(L,B){u=!1,g&&(g=!1,p(S),S=-1),s=!0;var b=o;try{for(C(B),a=n(i);a!==null&&(!(a.expirationTime>B)||L&&!J());){var Q=a.callback;if(typeof Q=="function"){a.callback=null,o=a.priorityLevel;var T=Q(a.expirationTime<=B);B=e.unstable_now(),typeof T=="function"?a.callback=T:a===n(i)&&r(i),C(B)}else r(i);a=n(i)}if(a!==null)var M=!0;else{var _=n(h);_!==null&&H(y,_.startTime-B),M=!1}return M}finally{a=null,o=b,s=!1}}var w=!1,I=null,S=-1,D=5,R=-1;function J(){return!(e.unstable_now()-RL||125Q?(L.sortIndex=b,t(h,L),n(i)===null&&L===n(h)&&(g?(p(S),S=-1):g=!0,H(y,b-Q))):(L.sortIndex=T,t(i,L),u||s||(u=!0,oe(E))),L},e.unstable_shouldYield=J,e.unstable_wrapCallback=function(L){var B=o;return function(){var b=o;o=B;try{return L.apply(this,arguments)}finally{o=b}}}})(xg);(function(e){e.exports=xg})(Bg);/** + */(function(e){function t(L,B){var b=L.length;L.push(B);e:for(;0>>1,T=L[Q];if(0>>1;Ql(x,b))Ol(F,x)?(L[Q]=F,L[O]=b,Q=O):(L[Q]=x,L[_]=b,Q=_);else if(Ol(F,b))L[Q]=F,L[O]=b,Q=O;else break e}}return B}function l(L,B){var b=L.sortIndex-B.sortIndex;return b!==0?b:L.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var A=performance;e.unstable_now=function(){return A.now()}}else{var m=Date,c=m.now();e.unstable_now=function(){return m.now()-c}}var i=[],h=[],d=1,a=null,o=3,s=!1,u=!1,g=!1,f=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(L){for(var B=n(h);B!==null;){if(B.callback===null)r(h);else if(B.startTime<=L)r(h),B.sortIndex=B.expirationTime,t(i,B);else break;B=n(h)}}function y(L){if(g=!1,C(L),!u)if(n(i)!==null)u=!0,oe(E);else{var B=n(h);B!==null&&H(y,B.startTime-L)}}function E(L,B){u=!1,g&&(g=!1,p(S),S=-1),s=!0;var b=o;try{for(C(B),a=n(i);a!==null&&(!(a.expirationTime>B)||L&&!J());){var Q=a.callback;if(typeof Q=="function"){a.callback=null,o=a.priorityLevel;var T=Q(a.expirationTime<=B);B=e.unstable_now(),typeof T=="function"?a.callback=T:a===n(i)&&r(i),C(B)}else r(i);a=n(i)}if(a!==null)var M=!0;else{var _=n(h);_!==null&&H(y,_.startTime-B),M=!1}return M}finally{a=null,o=b,s=!1}}var w=!1,I=null,S=-1,D=5,R=-1;function J(){return!(e.unstable_now()-RL||125Q?(L.sortIndex=b,t(h,L),n(i)===null&&L===n(h)&&(g?(p(S),S=-1):g=!0,H(y,b-Q))):(L.sortIndex=T,t(i,L),u||s||(u=!0,oe(E))),L},e.unstable_shouldYield=J,e.unstable_wrapCallback=function(L){var B=o;return function(){var b=o;o=B;try{return L.apply(this,arguments)}finally{o=b}}}})(xg);(function(e){e.exports=xg})(Bg);/** * @license React * react-dom.production.min.js * @@ -30,24 +30,24 @@ var fm=Object.defineProperty;var Am=(e,t,n)=>t in e?fm(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Sg=K.exports,It=Bg.exports;function ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gl=Object.prototype.hasOwnProperty,Rm=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,of={},lf={};function Nm(e){return Gl.call(lf,e)?!0:Gl.call(of,e)?!1:Rm.test(e)?lf[e]=!0:(of[e]=!0,!1)}function Gm(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function jm(e,t,n,r){if(t===null||typeof t>"u"||Gm(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ct(e,t,n,r,l,d,m){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=d,this.removeEmptyString=m}var Ke={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ke[e]=new ct(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ke[t]=new ct(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ke[e]=new ct(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ke[e]=new ct(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ke[e]=new ct(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ke[e]=new ct(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ke[e]=new ct(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ke[e]=new ct(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ke[e]=new ct(e,5,!1,e.toLowerCase(),null,!1,!1)});var Au=/[\-:]([a-z])/g;function du(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Au,du);Ke[t]=new ct(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Au,du);Ke[t]=new ct(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Au,du);Ke[t]=new ct(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ke[e]=new ct(e,1,!1,e.toLowerCase(),null,!1,!1)});Ke.xlinkHref=new ct("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ke[e]=new ct(e,1,!1,e.toLowerCase(),null,!0,!0)});function gu(e,t,n,r){var l=Ke.hasOwnProperty(t)?Ke[t]:null;(l!==null?l.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gl=Object.prototype.hasOwnProperty,Rm=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,of={},lf={};function Nm(e){return Gl.call(lf,e)?!0:Gl.call(of,e)?!1:Rm.test(e)?lf[e]=!0:(of[e]=!0,!1)}function Gm(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function jm(e,t,n,r){if(t===null||typeof t>"u"||Gm(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ct(e,t,n,r,l,A,m){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=A,this.removeEmptyString=m}var Ke={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ke[e]=new ct(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ke[t]=new ct(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ke[e]=new ct(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ke[e]=new ct(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ke[e]=new ct(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ke[e]=new ct(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ke[e]=new ct(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ke[e]=new ct(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ke[e]=new ct(e,5,!1,e.toLowerCase(),null,!1,!1)});var du=/[\-:]([a-z])/g;function Au(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(du,Au);Ke[t]=new ct(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(du,Au);Ke[t]=new ct(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(du,Au);Ke[t]=new ct(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ke[e]=new ct(e,1,!1,e.toLowerCase(),null,!1,!1)});Ke.xlinkHref=new ct("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ke[e]=new ct(e,1,!1,e.toLowerCase(),null,!0,!0)});function gu(e,t,n,r){var l=Ke.hasOwnProperty(t)?Ke[t]:null;(l!==null?l.type!==0:r||!(2c||l[m]!==d[c]){var i=` -`+l[m].replace(" at new "," at ");return e.displayName&&i.includes("")&&(i=i.replace("",e.displayName)),i}while(1<=m&&0<=c);break}}}finally{Vo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Hi(e):""}function $m(e){switch(e.tag){case 5:return Hi(e.type);case 16:return Hi("Lazy");case 13:return Hi("Suspense");case 19:return Hi("SuspenseList");case 0:case 2:case 15:return e=Jo(e.type,!1),e;case 11:return e=Jo(e.type.render,!1),e;case 1:return e=Jo(e.type,!0),e;default:return""}}function Hl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case $r:return"Fragment";case jr:return"Portal";case jl:return"Profiler";case pu:return"StrictMode";case $l:return"Suspense";case Ul:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Qg:return(e.displayName||"Context")+".Consumer";case _g:return(e._context.displayName||"Context")+".Provider";case vu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case mu:return t=e.displayName||null,t!==null?t:Hl(e.type)||"Memo";case xn:t=e._payload,e=e._init;try{return Hl(e(t))}catch{}}return null}function Um(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Hl(t);case 8:return t===pu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Nn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Tg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Hm(e){var t=Tg(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,d=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(m){r=""+m,d.call(this,m)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(m){r=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wa(e){e._valueTracker||(e._valueTracker=Hm(e))}function Dg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Tg(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ks(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Yl(e,t){var n=t.checked;return Re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function uf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Nn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Og(e,t){t=t.checked,t!=null&&gu(e,"checked",t,!1)}function zl(e,t){Og(e,t);var n=Nn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Wl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Wl(e,t.type,Nn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function hf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Wl(e,t,n){(t!=="number"||ks(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Yi=Array.isArray;function ni(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Xa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ua(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ki={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ym=["Webkit","ms","Moz","O"];Object.keys(Ki).forEach(function(e){Ym.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ki[t]=Ki[e]})});function Lg(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ki.hasOwnProperty(e)&&Ki[e]?(""+t).trim():t+"px"}function Rg(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Lg(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var zm=Re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Jl(e,t){if(t){if(zm[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ne(62))}}function Kl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ql=null;function Cu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zl=null,ri=null,ii=null;function df(e){if(e=Oa(e)){if(typeof Zl!="function")throw Error(ne(280));var t=e.stateNode;t&&(t=po(t),Zl(e.stateNode,e.type,t))}}function Ng(e){ri?ii?ii.push(e):ii=[e]:ri=e}function Gg(){if(ri){var e=ri,t=ii;if(ii=ri=null,df(e),t)for(e=0;e>>=0,e===0?32:31-(rC(e)/iC|0)|0}var Va=64,Ja=4194304;function zi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Fs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,d=e.pingedLanes,m=n&268435455;if(m!==0){var c=m&~l;c!==0?r=zi(c):(d&=m,d!==0&&(r=zi(d)))}else m=n&~l,m!==0?r=zi(m):d!==0&&(r=zi(d));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,d=t&-t,l>=d||l===16&&(d&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ta(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ut(t),e[t]=n}function lC(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Zi),If=String.fromCharCode(32),Bf=!1;function sp(e,t){switch(e){case"keyup":return PC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function op(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ur=!1;function RC(e,t){switch(e){case"compositionend":return op(t);case"keypress":return t.which!==32?null:(Bf=!0,If);case"textInput":return e=t.data,e===If&&Bf?null:e;default:return null}}function NC(e,t){if(Ur)return e==="compositionend"||!bu&&sp(e,t)?(e=ip(),ms=Bu=Qn=null,Ur=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=_f(n)}}function hp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?hp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fp(){for(var e=window,t=ks();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ks(e.document)}return t}function _u(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function XC(e){var t=fp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hp(n.ownerDocument.documentElement,n)){if(r!==null&&_u(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,d=Math.min(r.start,l);r=r.end===void 0?d:Math.min(r.end,l),!e.extend&&d>r&&(l=r,r=d,d=l),l=Qf(n,d);var m=Qf(n,r);l&&m&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==m.node||e.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),d>r?(e.addRange(t),e.extend(m.node,m.offset)):(t.setEnd(m.node,m.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Hr=null,ac=null,ta=null,sc=!1;function kf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;sc||Hr==null||Hr!==ks(r)||(r=Hr,"selectionStart"in r&&_u(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ta&&pa(ta,r)||(ta=r,r=Ls(ac,"onSelect"),0Wr||(e.current=fc[Wr],fc[Wr]=null,Wr--)}function _e(e,t){Wr++,fc[Wr]=e.current,e.current=t}var Gn={},tt=Yn(Gn),At=Yn(!1),sr=Gn;function hi(e,t){var n=e.type.contextTypes;if(!n)return Gn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},d;for(d in n)l[d]=t[d];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function dt(e){return e=e.childContextTypes,e!=null}function Ns(){De(At),De(tt)}function Lf(e,t,n){if(tt.current!==Gn)throw Error(ne(168));_e(tt,t),_e(At,n)}function Ep(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(ne(108,Um(e)||"Unknown",l));return Re({},n,r)}function Gs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gn,sr=tt.current,_e(tt,e),_e(At,At.current),!0}function Rf(e,t,n){var r=e.stateNode;if(!r)throw Error(ne(169));n?(e=Ep(e,t,sr),r.__reactInternalMemoizedMergedChildContext=e,De(At),De(tt),_e(tt,e)):De(At),_e(At,n)}var fn=null,vo=!1,ul=!1;function wp(e){fn===null?fn=[e]:fn.push(e)}function sy(e){vo=!0,wp(e)}function zn(){if(!ul&&fn!==null){ul=!0;var e=0,t=xe;try{var n=fn;for(xe=1;e>=m,l-=m,An=1<<32-Ut(t)+l|n<S?(D=I,I=null):D=I.sibling;var R=o(p,I,C[S],y);if(R===null){I===null&&(I=D);break}e&&I&&R.alternate===null&&t(p,I),v=d(R,v,S),w===null?E=R:w.sibling=R,w=R,I=D}if(S===C.length)return n(p,I),Me&&Jn(p,S),E;if(I===null){for(;SS?(D=I,I=null):D=I.sibling;var J=o(p,I,R.value,y);if(J===null){I===null&&(I=D);break}e&&I&&J.alternate===null&&t(p,I),v=d(J,v,S),w===null?E=J:w.sibling=J,w=J,I=D}if(R.done)return n(p,I),Me&&Jn(p,S),E;if(I===null){for(;!R.done;S++,R=C.next())R=a(p,R.value,y),R!==null&&(v=d(R,v,S),w===null?E=R:w.sibling=R,w=R);return Me&&Jn(p,S),E}for(I=r(p,I);!R.done;S++,R=C.next())R=s(I,p,S,R.value,y),R!==null&&(e&&R.alternate!==null&&I.delete(R.key===null?S:R.key),v=d(R,v,S),w===null?E=R:w.sibling=R,w=R);return e&&I.forEach(function(ee){return t(p,ee)}),Me&&Jn(p,S),E}function f(p,v,C,y){if(typeof C=="object"&&C!==null&&C.type===$r&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case za:e:{for(var E=C.key,w=v;w!==null;){if(w.key===E){if(E=C.type,E===$r){if(w.tag===7){n(p,w.sibling),v=l(w,C.props.children),v.return=p,p=v;break e}}else if(w.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===xn&&Yf(E)===w.type){n(p,w.sibling),v=l(w,C.props),v.ref=Li(p,w,C),v.return=p,p=v;break e}n(p,w);break}else t(p,w);w=w.sibling}C.type===$r?(v=ar(C.props.children,p.mode,y,C.key),v.return=p,p=v):(y=Ss(C.type,C.key,C.props,null,p.mode,y),y.ref=Li(p,v,C),y.return=p,p=y)}return m(p);case jr:e:{for(w=C.key;v!==null;){if(v.key===w)if(v.tag===4&&v.stateNode.containerInfo===C.containerInfo&&v.stateNode.implementation===C.implementation){n(p,v.sibling),v=l(v,C.children||[]),v.return=p,p=v;break e}else{n(p,v);break}else t(p,v);v=v.sibling}v=ml(C,p.mode,y),v.return=p,p=v}return m(p);case xn:return w=C._init,f(p,v,w(C._payload),y)}if(Yi(C))return u(p,v,C,y);if(Di(C))return g(p,v,C,y);rs(p,C)}return typeof C=="string"&&C!==""||typeof C=="number"?(C=""+C,v!==null&&v.tag===6?(n(p,v.sibling),v=l(v,C),v.return=p,p=v):(n(p,v),v=vl(C,p.mode,y),v.return=p,p=v),m(p)):n(p,v)}return f}var Ai=kp(!0),Tp=kp(!1),Fa={},an=Yn(Fa),ya=Yn(Fa),Ea=Yn(Fa);function rr(e){if(e===Fa)throw Error(ne(174));return e}function Lu(e,t){switch(_e(Ea,t),_e(ya,e),_e(an,Fa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Vl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Vl(t,e)}De(an),_e(an,t)}function di(){De(an),De(ya),De(Ea)}function Dp(e){rr(Ea.current);var t=rr(an.current),n=Vl(t,e.type);t!==n&&(_e(ya,e),_e(an,n))}function Ru(e){ya.current===e&&(De(an),De(ya))}var Pe=Yn(0);function zs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var hl=[];function Nu(){for(var e=0;en?n:4,e(!0);var r=fl.transition;fl.transition={};try{e(!1),t()}finally{xe=n,fl.transition=r}}function Xp(){return Ft().memoizedState}function uy(e,t,n){var r=Ln(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Vp(e))Jp(t,n);else if(n=Sp(e,t,n,r),n!==null){var l=ot();Ht(n,e,r,l),Kp(n,t,r)}}function hy(e,t,n){var r=Ln(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vp(e))Jp(t,l);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var m=t.lastRenderedState,c=d(m,n);if(l.hasEagerState=!0,l.eagerState=c,Yt(c,m)){var i=t.interleaved;i===null?(l.next=l,Mu(t)):(l.next=i.next,i.next=l),t.interleaved=l;return}}catch{}finally{}n=Sp(e,t,l,r),n!==null&&(l=ot(),Ht(n,e,r,l),Kp(n,t,r))}}function Vp(e){var t=e.alternate;return e===Le||t!==null&&t===Le}function Jp(e,t){na=Ws=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Kp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Eu(e,n)}}var Xs={readContext:Ot,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useInsertionEffect:qe,useLayoutEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useMutableSource:qe,useSyncExternalStore:qe,useId:qe,unstable_isNewReconciler:!1},fy={readContext:Ot,useCallback:function(e,t){return Zt().memoizedState=[e,t===void 0?null:t],e},useContext:Ot,useEffect:Wf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ws(4194308,4,Up.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ws(4194308,4,e,t)},useInsertionEffect:function(e,t){return ws(4,2,e,t)},useMemo:function(e,t){var n=Zt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Zt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=uy.bind(null,Le,e),[r.memoizedState,e]},useRef:function(e){var t=Zt();return e={current:e},t.memoizedState=e},useState:zf,useDebugValue:Hu,useDeferredValue:function(e){return Zt().memoizedState=e},useTransition:function(){var e=zf(!1),t=e[0];return e=cy.bind(null,e[1]),Zt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Le,l=Zt();if(Me){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=t(),Xe===null)throw Error(ne(349));lr&30||Mp(r,t,n)}l.memoizedState=n;var d={value:n,getSnapshot:t};return l.queue=d,Wf(Lp.bind(null,r,d,e),[e]),r.flags|=2048,Ba(9,Pp.bind(null,r,d,n,t),void 0,null),n},useId:function(){var e=Zt(),t=Xe.identifierPrefix;if(Me){var n=dn,r=An;n=(r&~(1<<32-Ut(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=wa++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=m.createElement(n,{is:r.is}):(e=m.createElement(n),n==="select"&&(m=e,r.multiple?m.multiple=!0:r.size&&(m.size=r.size))):e=m.createElementNS(e,n),e[tn]=t,e[Ca]=r,s0(e,t,!1,!1),t.stateNode=e;e:{switch(m=Kl(n,r),n){case"dialog":Qe("cancel",e),Qe("close",e),l=r;break;case"iframe":case"object":case"embed":Qe("load",e),l=r;break;case"video":case"audio":for(l=0;lpi&&(t.flags|=128,r=!0,Ri(d,!1),t.lanes=4194304)}else{if(!r)if(e=zs(m),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ri(d,!0),d.tail===null&&d.tailMode==="hidden"&&!m.alternate&&!Me)return Ze(t),null}else 2*$e()-d.renderingStartTime>pi&&n!==1073741824&&(t.flags|=128,r=!0,Ri(d,!1),t.lanes=4194304);d.isBackwards?(m.sibling=t.child,t.child=m):(n=d.last,n!==null?n.sibling=m:t.child=m,d.last=m)}return d.tail!==null?(t=d.tail,d.rendering=t,d.tail=t.sibling,d.renderingStartTime=$e(),t.sibling=null,n=Pe.current,_e(Pe,r?n&1|2:n&1),t):(Ze(t),null);case 22:case 23:return Ju(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ct&1073741824&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),null;case 24:return null;case 25:return null}throw Error(ne(156,t.tag))}function yy(e,t){switch(ku(t),t.tag){case 1:return dt(t.type)&&Ns(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return di(),De(At),De(tt),Nu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ru(t),null;case 13:if(De(Pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return De(Pe),null;case 4:return di(),null;case 10:return Fu(t.type._context),null;case 22:case 23:return Ju(),null;case 24:return null;default:return null}}var as=!1,et=!1,Ey=typeof WeakSet=="function"?WeakSet:Set,le=null;function Kr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ge(e,t,r)}else n.current=null}function Bc(e,t,n){try{n()}catch(r){Ge(e,t,r)}}var nA=!1;function wy(e,t){if(oc=Ms,e=fp(),_u(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,d=r.focusNode;r=r.focusOffset;try{n.nodeType,d.nodeType}catch{n=null;break e}var m=0,c=-1,i=-1,h=0,A=0,a=e,o=null;t:for(;;){for(var s;a!==n||l!==0&&a.nodeType!==3||(c=m+l),a!==d||r!==0&&a.nodeType!==3||(i=m+r),a.nodeType===3&&(m+=a.nodeValue.length),(s=a.firstChild)!==null;)o=a,a=s;for(;;){if(a===e)break t;if(o===n&&++h===l&&(c=m),o===d&&++A===r&&(i=m),(s=a.nextSibling)!==null)break;a=o,o=a.parentNode}a=s}n=c===-1||i===-1?null:{start:c,end:i}}else n=null}n=n||{start:0,end:0}}else n=null;for(lc={focusedElem:e,selectionRange:n},Ms=!1,le=t;le!==null;)if(t=le,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,le=e;else for(;le!==null;){t=le;try{var u=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(u!==null){var g=u.memoizedProps,f=u.memoizedState,p=t.stateNode,v=p.getSnapshotBeforeUpdate(t.elementType===t.type?g:Nt(t.type,g),f);p.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var C=t.stateNode.containerInfo;C.nodeType===1?C.textContent="":C.nodeType===9&&C.documentElement&&C.removeChild(C.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(y){Ge(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,le=e;break}le=t.return}return u=nA,nA=!1,u}function ra(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var d=l.destroy;l.destroy=void 0,d!==void 0&&Bc(t,n,d)}l=l.next}while(l!==r)}}function yo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function c0(e){var t=e.alternate;t!==null&&(e.alternate=null,c0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[tn],delete t[Ca],delete t[hc],delete t[iy],delete t[ay])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function u0(e){return e.tag===5||e.tag===3||e.tag===4}function rA(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||u0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Rs));else if(r!==4&&(e=e.child,e!==null))for(Sc(e,t,n),e=e.sibling;e!==null;)Sc(e,t,n),e=e.sibling}function bc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(bc(e,t,n),e=e.sibling;e!==null;)bc(e,t,n),e=e.sibling}var Ve=null,Gt=!1;function Bn(e,t,n){for(n=n.child;n!==null;)h0(e,t,n),n=n.sibling}function h0(e,t,n){if(rn&&typeof rn.onCommitFiberUnmount=="function")try{rn.onCommitFiberUnmount(ho,n)}catch{}switch(n.tag){case 5:et||Kr(n,t);case 6:var r=Ve,l=Gt;Ve=null,Bn(e,t,n),Ve=r,Gt=l,Ve!==null&&(Gt?(e=Ve,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ve.removeChild(n.stateNode));break;case 18:Ve!==null&&(Gt?(e=Ve,n=n.stateNode,e.nodeType===8?cl(e.parentNode,n):e.nodeType===1&&cl(e,n),da(e)):cl(Ve,n.stateNode));break;case 4:r=Ve,l=Gt,Ve=n.stateNode.containerInfo,Gt=!0,Bn(e,t,n),Ve=r,Gt=l;break;case 0:case 11:case 14:case 15:if(!et&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var d=l,m=d.destroy;d=d.tag,m!==void 0&&(d&2||d&4)&&Bc(n,t,m),l=l.next}while(l!==r)}Bn(e,t,n);break;case 1:if(!et&&(Kr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(c){Ge(n,t,c)}Bn(e,t,n);break;case 21:Bn(e,t,n);break;case 22:n.mode&1?(et=(r=et)||n.memoizedState!==null,Bn(e,t,n),et=r):Bn(e,t,n);break;default:Bn(e,t,n)}}function iA(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ey),t.forEach(function(r){var l=Ty.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Pt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=m),r&=~d}if(r=l,r=$e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*By(r/1960))-r,10e?16:e,kn===null)var r=!1;else{if(e=kn,kn=null,Ks=0,we&6)throw Error(ne(331));var l=we;for(we|=4,le=e.current;le!==null;){var d=le,m=d.child;if(le.flags&16){var c=d.deletions;if(c!==null){for(var i=0;i$e()-Xu?ir(e,0):Wu|=n),gt(e,t)}function C0(e,t){t===0&&(e.mode&1?(t=Ja,Ja<<=1,!(Ja&130023424)&&(Ja=4194304)):t=1);var n=ot();e=mn(e,t),e!==null&&(Ta(e,t,n),gt(e,n))}function ky(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),C0(e,n)}function Ty(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ne(314))}r!==null&&r.delete(t),C0(e,n)}var y0;y0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||At.current)ft=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ft=!1,my(e,t,n);ft=!!(e.flags&131072)}else ft=!1,Me&&t.flags&1048576&&Ip(t,$s,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Is(e,t),e=t.pendingProps;var l=hi(t,tt.current);si(t,n),l=ju(null,t,r,e,l,n);var d=$u();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,dt(r)?(d=!0,Gs(t)):d=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Pu(t),l.updater=mo,t.stateNode=l,l._reactInternals=t,vc(t,r,e,n),t=yc(null,t,r,!0,d,n)):(t.tag=0,Me&&d&&Qu(t),rt(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Is(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Oy(r),e=Nt(r,e),l){case 0:t=Cc(null,t,r,e,n);break e;case 1:t=Zf(null,t,r,e,n);break e;case 11:t=Kf(null,t,r,e,n);break e;case 14:t=qf(null,t,r,Nt(r.type,e),n);break e}throw Error(ne(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Nt(r,l),Cc(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Nt(r,l),Zf(e,t,r,l,n);case 3:e:{if(r0(t),e===null)throw Error(ne(387));r=t.pendingProps,d=t.memoizedState,l=d.element,bp(e,t),Ys(t,r,null,n);var m=t.memoizedState;if(r=m.element,d.isDehydrated)if(d={element:r,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){l=gi(Error(ne(423)),t),t=eA(e,t,r,n,l);break e}else if(r!==l){l=gi(Error(ne(424)),t),t=eA(e,t,r,n,l);break e}else for(yt=Fn(t.stateNode.containerInfo.firstChild),wt=t,Me=!0,jt=null,n=Tp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(fi(),r===l){t=Cn(e,t,n);break e}rt(e,t,r,n)}t=t.child}return t;case 5:return Dp(t),e===null&&dc(t),r=t.type,l=t.pendingProps,d=e!==null?e.memoizedProps:null,m=l.children,cc(r,l)?m=null:d!==null&&cc(r,d)&&(t.flags|=32),n0(e,t),rt(e,t,m,n),t.child;case 6:return e===null&&dc(t),null;case 13:return i0(e,t,n);case 4:return Lu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ai(t,null,r,n):rt(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Nt(r,l),Kf(e,t,r,l,n);case 7:return rt(e,t,t.pendingProps,n),t.child;case 8:return rt(e,t,t.pendingProps.children,n),t.child;case 12:return rt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,d=t.memoizedProps,m=l.value,_e(Us,r._currentValue),r._currentValue=m,d!==null)if(Yt(d.value,m)){if(d.children===l.children&&!At.current){t=Cn(e,t,n);break e}}else for(d=t.child,d!==null&&(d.return=t);d!==null;){var c=d.dependencies;if(c!==null){m=d.child;for(var i=c.firstContext;i!==null;){if(i.context===r){if(d.tag===1){i=gn(-1,n&-n),i.tag=2;var h=d.updateQueue;if(h!==null){h=h.shared;var A=h.pending;A===null?i.next=i:(i.next=A.next,A.next=i),h.pending=i}}d.lanes|=n,i=d.alternate,i!==null&&(i.lanes|=n),gc(d.return,n,t),c.lanes|=n;break}i=i.next}}else if(d.tag===10)m=d.type===t.type?null:d.child;else if(d.tag===18){if(m=d.return,m===null)throw Error(ne(341));m.lanes|=n,c=m.alternate,c!==null&&(c.lanes|=n),gc(m,n,t),m=d.sibling}else m=d.child;if(m!==null)m.return=d;else for(m=d;m!==null;){if(m===t){m=null;break}if(d=m.sibling,d!==null){d.return=m.return,m=d;break}m=m.return}d=m}rt(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,si(t,n),l=Ot(l),r=r(l),t.flags|=1,rt(e,t,r,n),t.child;case 14:return r=t.type,l=Nt(r,t.pendingProps),l=Nt(r.type,l),qf(e,t,r,l,n);case 15:return e0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Nt(r,l),Is(e,t),t.tag=1,dt(r)?(e=!0,Gs(t)):e=!1,si(t,n),Qp(t,r,l),vc(t,r,l,n),yc(null,t,r,!0,e,n);case 19:return a0(e,t,n);case 22:return t0(e,t,n)}throw Error(ne(156,t.tag))};function E0(e,t){return Wg(e,t)}function Dy(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function kt(e,t,n,r){return new Dy(e,t,n,r)}function qu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Oy(e){if(typeof e=="function")return qu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===vu)return 11;if(e===mu)return 14}return 2}function Rn(e,t){var n=e.alternate;return n===null?(n=kt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ss(e,t,n,r,l,d){var m=2;if(r=e,typeof e=="function")qu(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case $r:return ar(n.children,l,d,t);case pu:m=8,l|=8;break;case jl:return e=kt(12,n,t,l|2),e.elementType=jl,e.lanes=d,e;case $l:return e=kt(13,n,t,l),e.elementType=$l,e.lanes=d,e;case Ul:return e=kt(19,n,t,l),e.elementType=Ul,e.lanes=d,e;case kg:return wo(n,l,d,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _g:m=10;break e;case Qg:m=9;break e;case vu:m=11;break e;case mu:m=14;break e;case xn:m=16,r=null;break e}throw Error(ne(130,e==null?e:typeof e,""))}return t=kt(m,n,t,l),t.elementType=e,t.type=r,t.lanes=d,t}function ar(e,t,n,r){return e=kt(7,e,r,t),e.lanes=n,e}function wo(e,t,n,r){return e=kt(22,e,r,t),e.elementType=kg,e.lanes=n,e.stateNode={isHidden:!1},e}function vl(e,t,n){return e=kt(6,e,null,t),e.lanes=n,e}function ml(e,t,n){return t=kt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fy(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qo(0),this.expirationTimes=qo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Zu(e,t,n,r,l,d,m,c,i){return e=new Fy(e,t,n,c,i),t===1?(t=1,d===!0&&(t|=8)):t=0,d=kt(3,null,null,t),e.current=d,d.stateNode=e,d.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Pu(d),e}function My(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch{}}t(),e.exports=xt})(fu);var fA=fu.exports;Qs.createRoot=fA.createRoot,Qs.hydrateRoot=fA.hydrateRoot;const Gy="_app_l55t9_1",jy="_mask_l55t9_9",Cl={app:Gy,mask:jy};var Ne={};const $y={},Uy=Object.freeze(Object.defineProperty({__proto__:null,default:$y},Symbol.toStringTag,{value:"Module"})),yl=pm(Uy);(function(e){/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */var t=t||{version:"5.3.0"};if(e.fabric=t,typeof document<"u"&&typeof window<"u")document instanceof(typeof HTMLDocument<"u"?HTMLDocument:Document)?t.document=document:t.document=document.implementation.createHTMLDocument(""),t.window=window;else{var n=yl,r=new n.JSDOM(decodeURIComponent("%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E"),{features:{FetchExternalResources:["img"]},resources:"usable"}).window;t.document=r.document,t.jsdomImplForWrapper=yl.implForWrapper,t.nodeCanvas=yl.Canvas,t.window=r,DOMParser=t.window.DOMParser}t.isTouchSupported="ontouchstart"in t.window||"ontouchstart"in t.document||t.window&&t.window.navigator&&t.window.navigator.maxTouchPoints>0,t.isLikelyNode=typeof Buffer<"u"&&typeof window>"u",t.SHARED_ATTRIBUTES=["display","transform","fill","fill-opacity","fill-rule","opacity","stroke","stroke-dasharray","stroke-linecap","stroke-dashoffset","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","id","paint-order","vector-effect","instantiated_by_use","clip-path"],t.DPI=96,t.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)",t.commaWsp="(?:\\s+,?\\s*|,\\s*)",t.rePathCommand=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/ig,t.reNonWord=/[ \n\.,;!\?\-]/,t.fontPaths={},t.iMatrix=[1,0,0,1,0,0],t.svgNS="http://www.w3.org/2000/svg",t.perfLimitSizeTotal=2097152,t.maxCacheSideLimit=4096,t.minCacheSideLimit=256,t.charWidthsCache={},t.textureSize=2048,t.disableStyleCopyPaste=!1,t.enableGLFiltering=!0,t.devicePixelRatio=t.window.devicePixelRatio||t.window.webkitDevicePixelRatio||t.window.mozDevicePixelRatio||1,t.browserShadowBlurConstant=1,t.arcToSegmentsCache={},t.boundsOfCurveCache={},t.cachesBoundsOfCurve=!0,t.forceGLPutImageData=!1,t.initFilterBackend=function(){if(t.enableGLFiltering&&t.isWebglSupported&&t.isWebglSupported(t.textureSize))return new t.WebglFilterBackend({tileSize:t.textureSize});if(t.Canvas2dFilterBackend)return new t.Canvas2dFilterBackend},typeof document<"u"&&typeof window<"u"&&(window.fabric=t),function(){function c(s,u){if(this.__eventListeners[s]){var g=this.__eventListeners[s];u?g[g.indexOf(u)]=!1:t.util.array.fill(g,!1)}}function i(s,u){if(this.__eventListeners||(this.__eventListeners={}),arguments.length===1)for(var g in s)this.on(g,s[g]);else this.__eventListeners[s]||(this.__eventListeners[s]=[]),this.__eventListeners[s].push(u);return this}function h(s,u){var g=function(){u.apply(this,arguments),this.off(s,g)}.bind(this);this.on(s,g)}function A(s,u){if(arguments.length===1)for(var g in s)h.call(this,g,s[g]);else h.call(this,s,u);return this}function a(s,u){if(!this.__eventListeners)return this;if(arguments.length===0)for(s in this.__eventListeners)c.call(this,s);else if(arguments.length===1&&typeof arguments[0]=="object")for(var g in s)c.call(this,g,s[g]);else c.call(this,s,u);return this}function o(s,u){if(!this.__eventListeners)return this;var g=this.__eventListeners[s];if(!g)return this;for(var f=0,p=g.length;f"u"?this._objects.concat():this._objects.filter(function(i){return i.type===c})},item:function(c){return this._objects[c]},isEmpty:function(){return this._objects.length===0},size:function(){return this._objects.length},contains:function(c,i){return this._objects.indexOf(c)>-1?!0:i?this._objects.some(function(h){return typeof h.contains=="function"&&h.contains(c,!0)}):!1},complexity:function(){return this._objects.reduce(function(c,i){return c+=i.complexity?i.complexity():0,c},0)}},t.CommonMethods={_setOptions:function(c){for(var i in c)this.set(i,c[i])},_initGradient:function(c,i){c&&c.colorStops&&!(c instanceof t.Gradient)&&this.set(i,new t.Gradient(c))},_initPattern:function(c,i,h){c&&c.source&&!(c instanceof t.Pattern)?this.set(i,new t.Pattern(c,h)):h&&h()},_setObject:function(c){for(var i in c)this._set(i,c[i])},set:function(c,i){return typeof c=="object"?this._setObject(c):this._set(c,i),this},_set:function(c,i){this[c]=i},toggle:function(c){var i=this.get(c);return typeof i=="boolean"&&this.set(c,!i),this},get:function(c){return this[c]}},function(c){var i=Math.sqrt,h=Math.atan2,A=Math.pow,a=Math.PI/180,o=Math.PI/2;t.util={cos:function(s){if(s===0)return 1;s<0&&(s=-s);var u=s/o;switch(u){case 1:case 3:return 0;case 2:return-1}return Math.cos(s)},sin:function(s){if(s===0)return 0;var u=s/o,g=1;switch(s<0&&(g=-1),u){case 1:return g;case 2:return 0;case 3:return-g}return Math.sin(s)},removeFromArray:function(s,u){var g=s.indexOf(u);return g!==-1&&s.splice(g,1),s},getRandomInt:function(s,u){return Math.floor(Math.random()*(u-s+1))+s},degreesToRadians:function(s){return s*a},radiansToDegrees:function(s){return s/a},rotatePoint:function(s,u,g){var f=new t.Point(s.x-u.x,s.y-u.y),p=t.util.rotateVector(f,g);return new t.Point(p.x,p.y).addEquals(u)},rotateVector:function(s,u){var g=t.util.sin(u),f=t.util.cos(u),p=s.x*f-s.y*g,v=s.x*g+s.y*f;return{x:p,y:v}},createVector:function(s,u){return new t.Point(u.x-s.x,u.y-s.y)},calcAngleBetweenVectors:function(s,u){return Math.acos((s.x*u.x+s.y*u.y)/(Math.hypot(s.x,s.y)*Math.hypot(u.x,u.y)))},getHatVector:function(s){return new t.Point(s.x,s.y).multiply(1/Math.hypot(s.x,s.y))},getBisector:function(s,u,g){var f=t.util.createVector(s,u),p=t.util.createVector(s,g),v=t.util.calcAngleBetweenVectors(f,p),C=t.util.calcAngleBetweenVectors(t.util.rotateVector(f,v),p),y=v*(C===0?1:-1)/2;return{vector:t.util.getHatVector(t.util.rotateVector(f,y)),angle:v}},projectStrokeOnPoints:function(s,u,g){var f=[],p=u.strokeWidth/2,v=u.strokeUniform?new t.Point(1/u.scaleX,1/u.scaleY):new t.Point(1,1),C=function(y){var E=p/Math.hypot(y.x,y.y);return new t.Point(y.x*E*v.x,y.y*E*v.y)};return s.length<=1||s.forEach(function(y,E){var w=new t.Point(y.x,y.y),I,S;E===0?(S=s[E+1],I=g?C(t.util.createVector(S,w)).addEquals(w):s[s.length-1]):E===s.length-1?(I=s[E-1],S=g?C(t.util.createVector(I,w)).addEquals(w):s[0]):(I=s[E-1],S=s[E+1]);var D=t.util.getBisector(w,I,S),R=D.vector,J=D.angle,ee,Z;if(u.strokeLineJoin==="miter"&&(ee=-p/Math.sin(J/2),Z=new t.Point(R.x*ee*v.x,R.y*ee*v.y),Math.hypot(Z.x,Z.y)/p<=u.strokeMiterLimit)){f.push(w.add(Z)),f.push(w.subtract(Z));return}ee=-p*Math.SQRT2,Z=new t.Point(R.x*ee*v.x,R.y*ee*v.y),f.push(w.add(Z)),f.push(w.subtract(Z))}),f},transformPoint:function(s,u,g){return g?new t.Point(u[0]*s.x+u[2]*s.y,u[1]*s.x+u[3]*s.y):new t.Point(u[0]*s.x+u[2]*s.y+u[4],u[1]*s.x+u[3]*s.y+u[5])},makeBoundingBoxFromPoints:function(s,u){if(u)for(var g=0;g"u"?1:s.scaleX,g=typeof s.scaleY>"u"?1:s.scaleY,f=[s.flipX?-u:u,0,0,s.flipY?-g:g,0,0],p=t.util.multiplyTransformMatrices,v=t.util.degreesToRadians;return s.skewX&&(f=p(f,[1,0,Math.tan(v(s.skewX)),1],!0)),s.skewY&&(f=p(f,[1,Math.tan(v(s.skewY)),0,1],!0)),f},composeMatrix:function(s){var u=[1,0,0,1,s.translateX||0,s.translateY||0],g=t.util.multiplyTransformMatrices;return s.angle&&(u=g(u,t.util.calcRotateMatrix(s))),(s.scaleX!==1||s.scaleY!==1||s.skewX||s.skewY||s.flipX||s.flipY)&&(u=g(u,t.util.calcDimensionsMatrix(s))),u},resetObjectTransform:function(s){s.scaleX=1,s.scaleY=1,s.skewX=0,s.skewY=0,s.flipX=!1,s.flipY=!1,s.rotate(0)},saveObjectTransform:function(s){return{scaleX:s.scaleX,scaleY:s.scaleY,skewX:s.skewX,skewY:s.skewY,angle:s.angle,left:s.left,flipX:s.flipX,flipY:s.flipY,top:s.top}},isTransparent:function(s,u,g,f){f>0&&(u>f?u-=f:u=0,g>f?g-=f:g=0);var p=!0,v,C,y=s.getImageData(u,g,f*2||1,f*2||1),E=y.data.length;for(v=3;vc||l[m]!==A[c]){var i=` +`+l[m].replace(" at new "," at ");return e.displayName&&i.includes("")&&(i=i.replace("",e.displayName)),i}while(1<=m&&0<=c);break}}}finally{Vo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Hi(e):""}function $m(e){switch(e.tag){case 5:return Hi(e.type);case 16:return Hi("Lazy");case 13:return Hi("Suspense");case 19:return Hi("SuspenseList");case 0:case 2:case 15:return e=Jo(e.type,!1),e;case 11:return e=Jo(e.type.render,!1),e;case 1:return e=Jo(e.type,!0),e;default:return""}}function Hl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case $r:return"Fragment";case jr:return"Portal";case jl:return"Profiler";case pu:return"StrictMode";case $l:return"Suspense";case Ul:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Qg:return(e.displayName||"Context")+".Consumer";case _g:return(e._context.displayName||"Context")+".Provider";case vu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case mu:return t=e.displayName||null,t!==null?t:Hl(e.type)||"Memo";case xn:t=e._payload,e=e._init;try{return Hl(e(t))}catch{}}return null}function Um(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Hl(t);case 8:return t===pu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Nn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Tg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Hm(e){var t=Tg(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,A=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(m){r=""+m,A.call(this,m)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(m){r=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xa(e){e._valueTracker||(e._valueTracker=Hm(e))}function Dg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Tg(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ts(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Yl(e,t){var n=t.checked;return Re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function uf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Nn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Og(e,t){t=t.checked,t!=null&&gu(e,"checked",t,!1)}function zl(e,t){Og(e,t);var n=Nn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Wl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Wl(e,t.type,Nn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function hf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Wl(e,t,n){(t!=="number"||Ts(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Yi=Array.isArray;function ni(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Va.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ua(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ki={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ym=["Webkit","ms","Moz","O"];Object.keys(Ki).forEach(function(e){Ym.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ki[t]=Ki[e]})});function Lg(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ki.hasOwnProperty(e)&&Ki[e]?(""+t).trim():t+"px"}function Rg(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Lg(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var zm=Re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Jl(e,t){if(t){if(zm[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ne(62))}}function Kl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ql=null;function Cu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zl=null,ri=null,ii=null;function Af(e){if(e=Oa(e)){if(typeof Zl!="function")throw Error(ne(280));var t=e.stateNode;t&&(t=vo(t),Zl(e.stateNode,e.type,t))}}function Ng(e){ri?ii?ii.push(e):ii=[e]:ri=e}function Gg(){if(ri){var e=ri,t=ii;if(ii=ri=null,Af(e),t)for(e=0;e>>=0,e===0?32:31-(rC(e)/iC|0)|0}var Ja=64,Ka=4194304;function zi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ms(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,A=e.pingedLanes,m=n&268435455;if(m!==0){var c=m&~l;c!==0?r=zi(c):(A&=m,A!==0&&(r=zi(A)))}else m=n&~l,m!==0?r=zi(m):A!==0&&(r=zi(A));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,A=t&-t,l>=A||l===16&&(A&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ta(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ut(t),e[t]=n}function lC(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Zi),If=String.fromCharCode(32),Bf=!1;function sp(e,t){switch(e){case"keyup":return PC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function op(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ur=!1;function RC(e,t){switch(e){case"compositionend":return op(t);case"keypress":return t.which!==32?null:(Bf=!0,If);case"textInput":return e=t.data,e===If&&Bf?null:e;default:return null}}function NC(e,t){if(Ur)return e==="compositionend"||!bu&&sp(e,t)?(e=ip(),Cs=Bu=Qn=null,Ur=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=_f(n)}}function hp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?hp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fp(){for(var e=window,t=Ts();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ts(e.document)}return t}function _u(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function XC(e){var t=fp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hp(n.ownerDocument.documentElement,n)){if(r!==null&&_u(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,A=Math.min(r.start,l);r=r.end===void 0?A:Math.min(r.end,l),!e.extend&&A>r&&(l=r,r=A,A=l),l=Qf(n,A);var m=Qf(n,r);l&&m&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==m.node||e.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),A>r?(e.addRange(t),e.extend(m.node,m.offset)):(t.setEnd(m.node,m.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Hr=null,ac=null,ta=null,sc=!1;function kf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;sc||Hr==null||Hr!==Ts(r)||(r=Hr,"selectionStart"in r&&_u(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ta&&pa(ta,r)||(ta=r,r=Rs(ac,"onSelect"),0Wr||(e.current=fc[Wr],fc[Wr]=null,Wr--)}function _e(e,t){Wr++,fc[Wr]=e.current,e.current=t}var Gn={},tt=Yn(Gn),dt=Yn(!1),sr=Gn;function hi(e,t){var n=e.type.contextTypes;if(!n)return Gn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},A;for(A in n)l[A]=t[A];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function At(e){return e=e.childContextTypes,e!=null}function Gs(){De(dt),De(tt)}function Lf(e,t,n){if(tt.current!==Gn)throw Error(ne(168));_e(tt,t),_e(dt,n)}function Ep(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(ne(108,Um(e)||"Unknown",l));return Re({},n,r)}function js(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gn,sr=tt.current,_e(tt,e),_e(dt,dt.current),!0}function Rf(e,t,n){var r=e.stateNode;if(!r)throw Error(ne(169));n?(e=Ep(e,t,sr),r.__reactInternalMemoizedMergedChildContext=e,De(dt),De(tt),_e(tt,e)):De(dt),_e(dt,n)}var fn=null,mo=!1,ul=!1;function wp(e){fn===null?fn=[e]:fn.push(e)}function sy(e){mo=!0,wp(e)}function zn(){if(!ul&&fn!==null){ul=!0;var e=0,t=xe;try{var n=fn;for(xe=1;e>=m,l-=m,dn=1<<32-Ut(t)+l|n<S?(D=I,I=null):D=I.sibling;var R=o(p,I,C[S],y);if(R===null){I===null&&(I=D);break}e&&I&&R.alternate===null&&t(p,I),v=A(R,v,S),w===null?E=R:w.sibling=R,w=R,I=D}if(S===C.length)return n(p,I),Me&&Jn(p,S),E;if(I===null){for(;SS?(D=I,I=null):D=I.sibling;var J=o(p,I,R.value,y);if(J===null){I===null&&(I=D);break}e&&I&&J.alternate===null&&t(p,I),v=A(J,v,S),w===null?E=J:w.sibling=J,w=J,I=D}if(R.done)return n(p,I),Me&&Jn(p,S),E;if(I===null){for(;!R.done;S++,R=C.next())R=a(p,R.value,y),R!==null&&(v=A(R,v,S),w===null?E=R:w.sibling=R,w=R);return Me&&Jn(p,S),E}for(I=r(p,I);!R.done;S++,R=C.next())R=s(I,p,S,R.value,y),R!==null&&(e&&R.alternate!==null&&I.delete(R.key===null?S:R.key),v=A(R,v,S),w===null?E=R:w.sibling=R,w=R);return e&&I.forEach(function(ee){return t(p,ee)}),Me&&Jn(p,S),E}function f(p,v,C,y){if(typeof C=="object"&&C!==null&&C.type===$r&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case Wa:e:{for(var E=C.key,w=v;w!==null;){if(w.key===E){if(E=C.type,E===$r){if(w.tag===7){n(p,w.sibling),v=l(w,C.props.children),v.return=p,p=v;break e}}else if(w.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===xn&&Yf(E)===w.type){n(p,w.sibling),v=l(w,C.props),v.ref=Li(p,w,C),v.return=p,p=v;break e}n(p,w);break}else t(p,w);w=w.sibling}C.type===$r?(v=ar(C.props.children,p.mode,y,C.key),v.return=p,p=v):(y=bs(C.type,C.key,C.props,null,p.mode,y),y.ref=Li(p,v,C),y.return=p,p=y)}return m(p);case jr:e:{for(w=C.key;v!==null;){if(v.key===w)if(v.tag===4&&v.stateNode.containerInfo===C.containerInfo&&v.stateNode.implementation===C.implementation){n(p,v.sibling),v=l(v,C.children||[]),v.return=p,p=v;break e}else{n(p,v);break}else t(p,v);v=v.sibling}v=ml(C,p.mode,y),v.return=p,p=v}return m(p);case xn:return w=C._init,f(p,v,w(C._payload),y)}if(Yi(C))return u(p,v,C,y);if(Di(C))return g(p,v,C,y);is(p,C)}return typeof C=="string"&&C!==""||typeof C=="number"?(C=""+C,v!==null&&v.tag===6?(n(p,v.sibling),v=l(v,C),v.return=p,p=v):(n(p,v),v=vl(C,p.mode,y),v.return=p,p=v),m(p)):n(p,v)}return f}var di=kp(!0),Tp=kp(!1),Fa={},an=Yn(Fa),ya=Yn(Fa),Ea=Yn(Fa);function rr(e){if(e===Fa)throw Error(ne(174));return e}function Lu(e,t){switch(_e(Ea,t),_e(ya,e),_e(an,Fa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Vl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Vl(t,e)}De(an),_e(an,t)}function Ai(){De(an),De(ya),De(Ea)}function Dp(e){rr(Ea.current);var t=rr(an.current),n=Vl(t,e.type);t!==n&&(_e(ya,e),_e(an,n))}function Ru(e){ya.current===e&&(De(an),De(ya))}var Pe=Yn(0);function Ws(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var hl=[];function Nu(){for(var e=0;en?n:4,e(!0);var r=fl.transition;fl.transition={};try{e(!1),t()}finally{xe=n,fl.transition=r}}function Xp(){return Ft().memoizedState}function uy(e,t,n){var r=Ln(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Vp(e))Jp(t,n);else if(n=Sp(e,t,n,r),n!==null){var l=ot();Ht(n,e,r,l),Kp(n,t,r)}}function hy(e,t,n){var r=Ln(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vp(e))Jp(t,l);else{var A=e.alternate;if(e.lanes===0&&(A===null||A.lanes===0)&&(A=t.lastRenderedReducer,A!==null))try{var m=t.lastRenderedState,c=A(m,n);if(l.hasEagerState=!0,l.eagerState=c,Yt(c,m)){var i=t.interleaved;i===null?(l.next=l,Mu(t)):(l.next=i.next,i.next=l),t.interleaved=l;return}}catch{}finally{}n=Sp(e,t,l,r),n!==null&&(l=ot(),Ht(n,e,r,l),Kp(n,t,r))}}function Vp(e){var t=e.alternate;return e===Le||t!==null&&t===Le}function Jp(e,t){na=Xs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Kp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Eu(e,n)}}var Vs={readContext:Ot,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useInsertionEffect:qe,useLayoutEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useMutableSource:qe,useSyncExternalStore:qe,useId:qe,unstable_isNewReconciler:!1},fy={readContext:Ot,useCallback:function(e,t){return Zt().memoizedState=[e,t===void 0?null:t],e},useContext:Ot,useEffect:Wf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Is(4194308,4,Up.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Is(4194308,4,e,t)},useInsertionEffect:function(e,t){return Is(4,2,e,t)},useMemo:function(e,t){var n=Zt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Zt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=uy.bind(null,Le,e),[r.memoizedState,e]},useRef:function(e){var t=Zt();return e={current:e},t.memoizedState=e},useState:zf,useDebugValue:Hu,useDeferredValue:function(e){return Zt().memoizedState=e},useTransition:function(){var e=zf(!1),t=e[0];return e=cy.bind(null,e[1]),Zt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Le,l=Zt();if(Me){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=t(),Xe===null)throw Error(ne(349));lr&30||Mp(r,t,n)}l.memoizedState=n;var A={value:n,getSnapshot:t};return l.queue=A,Wf(Lp.bind(null,r,A,e),[e]),r.flags|=2048,Ba(9,Pp.bind(null,r,A,n,t),void 0,null),n},useId:function(){var e=Zt(),t=Xe.identifierPrefix;if(Me){var n=An,r=dn;n=(r&~(1<<32-Ut(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=wa++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=m.createElement(n,{is:r.is}):(e=m.createElement(n),n==="select"&&(m=e,r.multiple?m.multiple=!0:r.size&&(m.size=r.size))):e=m.createElementNS(e,n),e[tn]=t,e[Ca]=r,s0(e,t,!1,!1),t.stateNode=e;e:{switch(m=Kl(n,r),n){case"dialog":Qe("cancel",e),Qe("close",e),l=r;break;case"iframe":case"object":case"embed":Qe("load",e),l=r;break;case"video":case"audio":for(l=0;lpi&&(t.flags|=128,r=!0,Ri(A,!1),t.lanes=4194304)}else{if(!r)if(e=Ws(m),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ri(A,!0),A.tail===null&&A.tailMode==="hidden"&&!m.alternate&&!Me)return Ze(t),null}else 2*$e()-A.renderingStartTime>pi&&n!==1073741824&&(t.flags|=128,r=!0,Ri(A,!1),t.lanes=4194304);A.isBackwards?(m.sibling=t.child,t.child=m):(n=A.last,n!==null?n.sibling=m:t.child=m,A.last=m)}return A.tail!==null?(t=A.tail,A.rendering=t,A.tail=t.sibling,A.renderingStartTime=$e(),t.sibling=null,n=Pe.current,_e(Pe,r?n&1|2:n&1),t):(Ze(t),null);case 22:case 23:return Ju(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ct&1073741824&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),null;case 24:return null;case 25:return null}throw Error(ne(156,t.tag))}function yy(e,t){switch(ku(t),t.tag){case 1:return At(t.type)&&Gs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ai(),De(dt),De(tt),Nu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ru(t),null;case 13:if(De(Pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return De(Pe),null;case 4:return Ai(),null;case 10:return Fu(t.type._context),null;case 22:case 23:return Ju(),null;case 24:return null;default:return null}}var ss=!1,et=!1,Ey=typeof WeakSet=="function"?WeakSet:Set,le=null;function Kr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ge(e,t,r)}else n.current=null}function Bc(e,t,n){try{n()}catch(r){Ge(e,t,r)}}var nd=!1;function wy(e,t){if(oc=Ps,e=fp(),_u(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,A=r.focusNode;r=r.focusOffset;try{n.nodeType,A.nodeType}catch{n=null;break e}var m=0,c=-1,i=-1,h=0,d=0,a=e,o=null;t:for(;;){for(var s;a!==n||l!==0&&a.nodeType!==3||(c=m+l),a!==A||r!==0&&a.nodeType!==3||(i=m+r),a.nodeType===3&&(m+=a.nodeValue.length),(s=a.firstChild)!==null;)o=a,a=s;for(;;){if(a===e)break t;if(o===n&&++h===l&&(c=m),o===A&&++d===r&&(i=m),(s=a.nextSibling)!==null)break;a=o,o=a.parentNode}a=s}n=c===-1||i===-1?null:{start:c,end:i}}else n=null}n=n||{start:0,end:0}}else n=null;for(lc={focusedElem:e,selectionRange:n},Ps=!1,le=t;le!==null;)if(t=le,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,le=e;else for(;le!==null;){t=le;try{var u=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(u!==null){var g=u.memoizedProps,f=u.memoizedState,p=t.stateNode,v=p.getSnapshotBeforeUpdate(t.elementType===t.type?g:Nt(t.type,g),f);p.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var C=t.stateNode.containerInfo;C.nodeType===1?C.textContent="":C.nodeType===9&&C.documentElement&&C.removeChild(C.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(y){Ge(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,le=e;break}le=t.return}return u=nd,nd=!1,u}function ra(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var A=l.destroy;l.destroy=void 0,A!==void 0&&Bc(t,n,A)}l=l.next}while(l!==r)}}function Eo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function c0(e){var t=e.alternate;t!==null&&(e.alternate=null,c0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[tn],delete t[Ca],delete t[hc],delete t[iy],delete t[ay])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function u0(e){return e.tag===5||e.tag===3||e.tag===4}function rd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||u0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ns));else if(r!==4&&(e=e.child,e!==null))for(Sc(e,t,n),e=e.sibling;e!==null;)Sc(e,t,n),e=e.sibling}function bc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(bc(e,t,n),e=e.sibling;e!==null;)bc(e,t,n),e=e.sibling}var Ve=null,Gt=!1;function Bn(e,t,n){for(n=n.child;n!==null;)h0(e,t,n),n=n.sibling}function h0(e,t,n){if(rn&&typeof rn.onCommitFiberUnmount=="function")try{rn.onCommitFiberUnmount(fo,n)}catch{}switch(n.tag){case 5:et||Kr(n,t);case 6:var r=Ve,l=Gt;Ve=null,Bn(e,t,n),Ve=r,Gt=l,Ve!==null&&(Gt?(e=Ve,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ve.removeChild(n.stateNode));break;case 18:Ve!==null&&(Gt?(e=Ve,n=n.stateNode,e.nodeType===8?cl(e.parentNode,n):e.nodeType===1&&cl(e,n),Aa(e)):cl(Ve,n.stateNode));break;case 4:r=Ve,l=Gt,Ve=n.stateNode.containerInfo,Gt=!0,Bn(e,t,n),Ve=r,Gt=l;break;case 0:case 11:case 14:case 15:if(!et&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var A=l,m=A.destroy;A=A.tag,m!==void 0&&(A&2||A&4)&&Bc(n,t,m),l=l.next}while(l!==r)}Bn(e,t,n);break;case 1:if(!et&&(Kr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(c){Ge(n,t,c)}Bn(e,t,n);break;case 21:Bn(e,t,n);break;case 22:n.mode&1?(et=(r=et)||n.memoizedState!==null,Bn(e,t,n),et=r):Bn(e,t,n);break;default:Bn(e,t,n)}}function id(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ey),t.forEach(function(r){var l=Ty.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Pt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=m),r&=~A}if(r=l,r=$e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*By(r/1960))-r,10e?16:e,kn===null)var r=!1;else{if(e=kn,kn=null,qs=0,we&6)throw Error(ne(331));var l=we;for(we|=4,le=e.current;le!==null;){var A=le,m=A.child;if(le.flags&16){var c=A.deletions;if(c!==null){for(var i=0;i$e()-Xu?ir(e,0):Wu|=n),gt(e,t)}function C0(e,t){t===0&&(e.mode&1?(t=Ka,Ka<<=1,!(Ka&130023424)&&(Ka=4194304)):t=1);var n=ot();e=mn(e,t),e!==null&&(Ta(e,t,n),gt(e,n))}function ky(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),C0(e,n)}function Ty(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ne(314))}r!==null&&r.delete(t),C0(e,n)}var y0;y0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||dt.current)ft=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ft=!1,my(e,t,n);ft=!!(e.flags&131072)}else ft=!1,Me&&t.flags&1048576&&Ip(t,Us,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Bs(e,t),e=t.pendingProps;var l=hi(t,tt.current);si(t,n),l=ju(null,t,r,e,l,n);var A=$u();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,At(r)?(A=!0,js(t)):A=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Pu(t),l.updater=Co,t.stateNode=l,l._reactInternals=t,vc(t,r,e,n),t=yc(null,t,r,!0,A,n)):(t.tag=0,Me&&A&&Qu(t),rt(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Bs(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Oy(r),e=Nt(r,e),l){case 0:t=Cc(null,t,r,e,n);break e;case 1:t=Zf(null,t,r,e,n);break e;case 11:t=Kf(null,t,r,e,n);break e;case 14:t=qf(null,t,r,Nt(r.type,e),n);break e}throw Error(ne(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Nt(r,l),Cc(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Nt(r,l),Zf(e,t,r,l,n);case 3:e:{if(r0(t),e===null)throw Error(ne(387));r=t.pendingProps,A=t.memoizedState,l=A.element,bp(e,t),zs(t,r,null,n);var m=t.memoizedState;if(r=m.element,A.isDehydrated)if(A={element:r,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},t.updateQueue.baseState=A,t.memoizedState=A,t.flags&256){l=gi(Error(ne(423)),t),t=ed(e,t,r,n,l);break e}else if(r!==l){l=gi(Error(ne(424)),t),t=ed(e,t,r,n,l);break e}else for(yt=Fn(t.stateNode.containerInfo.firstChild),wt=t,Me=!0,jt=null,n=Tp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(fi(),r===l){t=Cn(e,t,n);break e}rt(e,t,r,n)}t=t.child}return t;case 5:return Dp(t),e===null&&Ac(t),r=t.type,l=t.pendingProps,A=e!==null?e.memoizedProps:null,m=l.children,cc(r,l)?m=null:A!==null&&cc(r,A)&&(t.flags|=32),n0(e,t),rt(e,t,m,n),t.child;case 6:return e===null&&Ac(t),null;case 13:return i0(e,t,n);case 4:return Lu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=di(t,null,r,n):rt(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Nt(r,l),Kf(e,t,r,l,n);case 7:return rt(e,t,t.pendingProps,n),t.child;case 8:return rt(e,t,t.pendingProps.children,n),t.child;case 12:return rt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,A=t.memoizedProps,m=l.value,_e(Hs,r._currentValue),r._currentValue=m,A!==null)if(Yt(A.value,m)){if(A.children===l.children&&!dt.current){t=Cn(e,t,n);break e}}else for(A=t.child,A!==null&&(A.return=t);A!==null;){var c=A.dependencies;if(c!==null){m=A.child;for(var i=c.firstContext;i!==null;){if(i.context===r){if(A.tag===1){i=gn(-1,n&-n),i.tag=2;var h=A.updateQueue;if(h!==null){h=h.shared;var d=h.pending;d===null?i.next=i:(i.next=d.next,d.next=i),h.pending=i}}A.lanes|=n,i=A.alternate,i!==null&&(i.lanes|=n),gc(A.return,n,t),c.lanes|=n;break}i=i.next}}else if(A.tag===10)m=A.type===t.type?null:A.child;else if(A.tag===18){if(m=A.return,m===null)throw Error(ne(341));m.lanes|=n,c=m.alternate,c!==null&&(c.lanes|=n),gc(m,n,t),m=A.sibling}else m=A.child;if(m!==null)m.return=A;else for(m=A;m!==null;){if(m===t){m=null;break}if(A=m.sibling,A!==null){A.return=m.return,m=A;break}m=m.return}A=m}rt(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,si(t,n),l=Ot(l),r=r(l),t.flags|=1,rt(e,t,r,n),t.child;case 14:return r=t.type,l=Nt(r,t.pendingProps),l=Nt(r.type,l),qf(e,t,r,l,n);case 15:return e0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Nt(r,l),Bs(e,t),t.tag=1,At(r)?(e=!0,js(t)):e=!1,si(t,n),Qp(t,r,l),vc(t,r,l,n),yc(null,t,r,!0,e,n);case 19:return a0(e,t,n);case 22:return t0(e,t,n)}throw Error(ne(156,t.tag))};function E0(e,t){return Wg(e,t)}function Dy(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function kt(e,t,n,r){return new Dy(e,t,n,r)}function qu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Oy(e){if(typeof e=="function")return qu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===vu)return 11;if(e===mu)return 14}return 2}function Rn(e,t){var n=e.alternate;return n===null?(n=kt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function bs(e,t,n,r,l,A){var m=2;if(r=e,typeof e=="function")qu(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case $r:return ar(n.children,l,A,t);case pu:m=8,l|=8;break;case jl:return e=kt(12,n,t,l|2),e.elementType=jl,e.lanes=A,e;case $l:return e=kt(13,n,t,l),e.elementType=$l,e.lanes=A,e;case Ul:return e=kt(19,n,t,l),e.elementType=Ul,e.lanes=A,e;case kg:return Io(n,l,A,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _g:m=10;break e;case Qg:m=9;break e;case vu:m=11;break e;case mu:m=14;break e;case xn:m=16,r=null;break e}throw Error(ne(130,e==null?e:typeof e,""))}return t=kt(m,n,t,l),t.elementType=e,t.type=r,t.lanes=A,t}function ar(e,t,n,r){return e=kt(7,e,r,t),e.lanes=n,e}function Io(e,t,n,r){return e=kt(22,e,r,t),e.elementType=kg,e.lanes=n,e.stateNode={isHidden:!1},e}function vl(e,t,n){return e=kt(6,e,null,t),e.lanes=n,e}function ml(e,t,n){return t=kt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fy(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qo(0),this.expirationTimes=qo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Zu(e,t,n,r,l,A,m,c,i){return e=new Fy(e,t,n,c,i),t===1?(t=1,A===!0&&(t|=8)):t=0,A=kt(3,null,null,t),e.current=A,A.stateNode=e,A.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Pu(A),e}function My(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch{}}t(),e.exports=xt})(fu);var fd=fu.exports;ks.createRoot=fd.createRoot,ks.hydrateRoot=fd.hydrateRoot;var Ne={};const Gy={},jy=Object.freeze(Object.defineProperty({__proto__:null,default:Gy},Symbol.toStringTag,{value:"Module"})),Cl=pm(jy);(function(e){/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */var t=t||{version:"5.3.0"};if(e.fabric=t,typeof document<"u"&&typeof window<"u")document instanceof(typeof HTMLDocument<"u"?HTMLDocument:Document)?t.document=document:t.document=document.implementation.createHTMLDocument(""),t.window=window;else{var n=Cl,r=new n.JSDOM(decodeURIComponent("%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E"),{features:{FetchExternalResources:["img"]},resources:"usable"}).window;t.document=r.document,t.jsdomImplForWrapper=Cl.implForWrapper,t.nodeCanvas=Cl.Canvas,t.window=r,DOMParser=t.window.DOMParser}t.isTouchSupported="ontouchstart"in t.window||"ontouchstart"in t.document||t.window&&t.window.navigator&&t.window.navigator.maxTouchPoints>0,t.isLikelyNode=typeof Buffer<"u"&&typeof window>"u",t.SHARED_ATTRIBUTES=["display","transform","fill","fill-opacity","fill-rule","opacity","stroke","stroke-dasharray","stroke-linecap","stroke-dashoffset","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","id","paint-order","vector-effect","instantiated_by_use","clip-path"],t.DPI=96,t.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)",t.commaWsp="(?:\\s+,?\\s*|,\\s*)",t.rePathCommand=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/ig,t.reNonWord=/[ \n\.,;!\?\-]/,t.fontPaths={},t.iMatrix=[1,0,0,1,0,0],t.svgNS="http://www.w3.org/2000/svg",t.perfLimitSizeTotal=2097152,t.maxCacheSideLimit=4096,t.minCacheSideLimit=256,t.charWidthsCache={},t.textureSize=2048,t.disableStyleCopyPaste=!1,t.enableGLFiltering=!0,t.devicePixelRatio=t.window.devicePixelRatio||t.window.webkitDevicePixelRatio||t.window.mozDevicePixelRatio||1,t.browserShadowBlurConstant=1,t.arcToSegmentsCache={},t.boundsOfCurveCache={},t.cachesBoundsOfCurve=!0,t.forceGLPutImageData=!1,t.initFilterBackend=function(){if(t.enableGLFiltering&&t.isWebglSupported&&t.isWebglSupported(t.textureSize))return new t.WebglFilterBackend({tileSize:t.textureSize});if(t.Canvas2dFilterBackend)return new t.Canvas2dFilterBackend},typeof document<"u"&&typeof window<"u"&&(window.fabric=t),function(){function c(s,u){if(this.__eventListeners[s]){var g=this.__eventListeners[s];u?g[g.indexOf(u)]=!1:t.util.array.fill(g,!1)}}function i(s,u){if(this.__eventListeners||(this.__eventListeners={}),arguments.length===1)for(var g in s)this.on(g,s[g]);else this.__eventListeners[s]||(this.__eventListeners[s]=[]),this.__eventListeners[s].push(u);return this}function h(s,u){var g=function(){u.apply(this,arguments),this.off(s,g)}.bind(this);this.on(s,g)}function d(s,u){if(arguments.length===1)for(var g in s)h.call(this,g,s[g]);else h.call(this,s,u);return this}function a(s,u){if(!this.__eventListeners)return this;if(arguments.length===0)for(s in this.__eventListeners)c.call(this,s);else if(arguments.length===1&&typeof arguments[0]=="object")for(var g in s)c.call(this,g,s[g]);else c.call(this,s,u);return this}function o(s,u){if(!this.__eventListeners)return this;var g=this.__eventListeners[s];if(!g)return this;for(var f=0,p=g.length;f"u"?this._objects.concat():this._objects.filter(function(i){return i.type===c})},item:function(c){return this._objects[c]},isEmpty:function(){return this._objects.length===0},size:function(){return this._objects.length},contains:function(c,i){return this._objects.indexOf(c)>-1?!0:i?this._objects.some(function(h){return typeof h.contains=="function"&&h.contains(c,!0)}):!1},complexity:function(){return this._objects.reduce(function(c,i){return c+=i.complexity?i.complexity():0,c},0)}},t.CommonMethods={_setOptions:function(c){for(var i in c)this.set(i,c[i])},_initGradient:function(c,i){c&&c.colorStops&&!(c instanceof t.Gradient)&&this.set(i,new t.Gradient(c))},_initPattern:function(c,i,h){c&&c.source&&!(c instanceof t.Pattern)?this.set(i,new t.Pattern(c,h)):h&&h()},_setObject:function(c){for(var i in c)this._set(i,c[i])},set:function(c,i){return typeof c=="object"?this._setObject(c):this._set(c,i),this},_set:function(c,i){this[c]=i},toggle:function(c){var i=this.get(c);return typeof i=="boolean"&&this.set(c,!i),this},get:function(c){return this[c]}},function(c){var i=Math.sqrt,h=Math.atan2,d=Math.pow,a=Math.PI/180,o=Math.PI/2;t.util={cos:function(s){if(s===0)return 1;s<0&&(s=-s);var u=s/o;switch(u){case 1:case 3:return 0;case 2:return-1}return Math.cos(s)},sin:function(s){if(s===0)return 0;var u=s/o,g=1;switch(s<0&&(g=-1),u){case 1:return g;case 2:return 0;case 3:return-g}return Math.sin(s)},removeFromArray:function(s,u){var g=s.indexOf(u);return g!==-1&&s.splice(g,1),s},getRandomInt:function(s,u){return Math.floor(Math.random()*(u-s+1))+s},degreesToRadians:function(s){return s*a},radiansToDegrees:function(s){return s/a},rotatePoint:function(s,u,g){var f=new t.Point(s.x-u.x,s.y-u.y),p=t.util.rotateVector(f,g);return new t.Point(p.x,p.y).addEquals(u)},rotateVector:function(s,u){var g=t.util.sin(u),f=t.util.cos(u),p=s.x*f-s.y*g,v=s.x*g+s.y*f;return{x:p,y:v}},createVector:function(s,u){return new t.Point(u.x-s.x,u.y-s.y)},calcAngleBetweenVectors:function(s,u){return Math.acos((s.x*u.x+s.y*u.y)/(Math.hypot(s.x,s.y)*Math.hypot(u.x,u.y)))},getHatVector:function(s){return new t.Point(s.x,s.y).multiply(1/Math.hypot(s.x,s.y))},getBisector:function(s,u,g){var f=t.util.createVector(s,u),p=t.util.createVector(s,g),v=t.util.calcAngleBetweenVectors(f,p),C=t.util.calcAngleBetweenVectors(t.util.rotateVector(f,v),p),y=v*(C===0?1:-1)/2;return{vector:t.util.getHatVector(t.util.rotateVector(f,y)),angle:v}},projectStrokeOnPoints:function(s,u,g){var f=[],p=u.strokeWidth/2,v=u.strokeUniform?new t.Point(1/u.scaleX,1/u.scaleY):new t.Point(1,1),C=function(y){var E=p/Math.hypot(y.x,y.y);return new t.Point(y.x*E*v.x,y.y*E*v.y)};return s.length<=1||s.forEach(function(y,E){var w=new t.Point(y.x,y.y),I,S;E===0?(S=s[E+1],I=g?C(t.util.createVector(S,w)).addEquals(w):s[s.length-1]):E===s.length-1?(I=s[E-1],S=g?C(t.util.createVector(I,w)).addEquals(w):s[0]):(I=s[E-1],S=s[E+1]);var D=t.util.getBisector(w,I,S),R=D.vector,J=D.angle,ee,Z;if(u.strokeLineJoin==="miter"&&(ee=-p/Math.sin(J/2),Z=new t.Point(R.x*ee*v.x,R.y*ee*v.y),Math.hypot(Z.x,Z.y)/p<=u.strokeMiterLimit)){f.push(w.add(Z)),f.push(w.subtract(Z));return}ee=-p*Math.SQRT2,Z=new t.Point(R.x*ee*v.x,R.y*ee*v.y),f.push(w.add(Z)),f.push(w.subtract(Z))}),f},transformPoint:function(s,u,g){return g?new t.Point(u[0]*s.x+u[2]*s.y,u[1]*s.x+u[3]*s.y):new t.Point(u[0]*s.x+u[2]*s.y+u[4],u[1]*s.x+u[3]*s.y+u[5])},makeBoundingBoxFromPoints:function(s,u){if(u)for(var g=0;g"u"?1:s.scaleX,g=typeof s.scaleY>"u"?1:s.scaleY,f=[s.flipX?-u:u,0,0,s.flipY?-g:g,0,0],p=t.util.multiplyTransformMatrices,v=t.util.degreesToRadians;return s.skewX&&(f=p(f,[1,0,Math.tan(v(s.skewX)),1],!0)),s.skewY&&(f=p(f,[1,Math.tan(v(s.skewY)),0,1],!0)),f},composeMatrix:function(s){var u=[1,0,0,1,s.translateX||0,s.translateY||0],g=t.util.multiplyTransformMatrices;return s.angle&&(u=g(u,t.util.calcRotateMatrix(s))),(s.scaleX!==1||s.scaleY!==1||s.skewX||s.skewY||s.flipX||s.flipY)&&(u=g(u,t.util.calcDimensionsMatrix(s))),u},resetObjectTransform:function(s){s.scaleX=1,s.scaleY=1,s.skewX=0,s.skewY=0,s.flipX=!1,s.flipY=!1,s.rotate(0)},saveObjectTransform:function(s){return{scaleX:s.scaleX,scaleY:s.scaleY,skewX:s.skewX,skewY:s.skewY,angle:s.angle,left:s.left,flipX:s.flipX,flipY:s.flipY,top:s.top}},isTransparent:function(s,u,g,f){f>0&&(u>f?u-=f:u=0,g>f?g-=f:g=0);var p=!0,v,C,y=s.getImageData(u,g,f*2||1,f*2||1),E=y.data.length;for(v=3;v0){var I=t.util.hasStyleChanged(v,w,!0);I?C.push({start:p,end:p+1,style:w}):C[C.length-1].end++}v=w||{}}}return C},stylesFromArray:function(s,u){if(!Array.isArray(s))return s;for(var g=u.split(` -`),f=-1,p=0,v={},C=0;C0?Oe-=2*O:_===1&&Oe<0&&(Oe+=2*O);for(var Ie=Math.ceil(Math.abs(Oe/O*2)),nt=[],Ue=Oe/Ie,Xn=8/3*Math.sin(Ue/4)*Math.sin(Ue/4)/Math.sin(Ue/2),Ti=Ee+Ue,Jt=0;Jt=M?_-M:2*Math.PI-(M-_)}function s(B,b,Q,T,M,_,x,O){var F;if(t.cachesBoundsOfCurve&&(F=c.call(arguments),t.boundsOfCurveCache[F]))return t.boundsOfCurveCache[F];var $=Math.sqrt,N=Math.min,X=Math.max,q=Math.abs,ie=[],G=[[],[]],P,Y,W,j,V,se,ge,he;Y=6*B-12*Q+6*M,P=-3*B+9*Q-9*M+3*x,W=3*Q-3*B;for(var z=0;z<2;++z){if(z>0&&(Y=6*b-12*T+6*_,P=-3*b+9*T-9*_+3*O,W=3*T-3*b),q(P)<1e-12){if(q(Y)<1e-12)continue;j=-W/Y,01e-4;)x=M(Q),N=Q,O=f(_.x,_.y,x.x,x.y),O+T>b?(Q-=F,F/=2):(_=x,Q+=F,T+=O);return x.angle=$(N),x}function te(B){for(var b=0,Q=B.length,T,M=0,_=0,x=0,O=0,F=[],$,N,X,q=0;q0&&Tge)for(var z=1,fe=P.length;z2;for(b=b||0,$&&(O=B[2].x<_.x?-1:B[2].x===_.x?0:1,F=B[2].y<_.y?-1:B[2].y===_.y?0:1),Q.push(["M",M.x-O*b,M.y-F*b]),T=1;TB[T-2].x?1:M.x===B[T-2].x?0:-1,F=M.y>B[T-2].y?1:M.y===B[T-2].y?0:-1),Q.push(["L",M.x+O*b,M.y+F*b]),Q}function L(B,b,Q){return Q&&(b=t.util.multiplyTransformMatrices(b,[1,0,0,1,-Q.x,-Q.y])),B.map(function(T){for(var M=T.slice(0),_={},x=1;x=f})}function A(s,u){return o(s,u,function(g,f){return g/g,">")}function A(o){var s=0,u,g=[];for(s=0,u;s57343)return o.charAt(s);if(55296<=u&&u<=56319){if(o.length<=s+1)throw"High surrogate without following low surrogate";var g=o.charCodeAt(s+1);if(56320>g||g>57343)throw"High surrogate without following low surrogate";return o.charAt(s)+o.charAt(s+1)}if(s===0)throw"Low surrogate without preceding high surrogate";var f=o.charCodeAt(s-1);if(55296>f||f>56319)throw"Low surrogate without preceding high surrogate";return!1}t.util.string={camelize:c,capitalize:i,escapeXml:h,graphemeSplit:A}}(),function(){var c=Array.prototype.slice,i=function(){},h=function(){for(var u in{toString:1})if(u==="toString")return!1;return!0}(),A=function(u,g,f){for(var p in g)p in u.prototype&&typeof u.prototype[p]=="function"&&(g[p]+"").indexOf("callSuper")>-1?u.prototype[p]=function(v){return function(){var C=this.constructor.superclass;this.constructor.superclass=f;var y=g[v].apply(this,arguments);if(this.constructor.superclass=C,v!=="initialize")return y}}(p):u.prototype[p]=g[p],h&&(g.toString!==Object.prototype.toString&&(u.prototype.toString=g.toString),g.valueOf!==Object.prototype.valueOf&&(u.prototype.valueOf=g.valueOf))};function a(){}function o(u){for(var g=null,f=this;f.constructor.superclass;){var p=f.constructor.superclass.prototype[u];if(f[u]!==p){g=p;break}f=f.constructor.superclass.prototype}if(g)return arguments.length>1?g.apply(this,c.call(arguments,1)):g.call(this)}function s(){var u=null,g=c.call(arguments,0);typeof g[0]=="function"&&(u=g.shift());function f(){this.initialize.apply(this,arguments)}f.superclass=u,f.subclasses=[],u&&(a.prototype=u.prototype,f.prototype=new a,u.subclasses.push(f));for(var p=0,v=g.length;p-1||A.pointerType==="touch"}}(),function(){function c(s,u){var g=s.style;if(!g)return s;if(typeof u=="string")return s.style.cssText+=";"+u,u.indexOf("opacity")>-1?o(s,u.match(/opacity:\s*(\d?\.?\d*)/)[1]):s;for(var f in u)if(f==="opacity")o(s,u[f]);else{var p=f==="float"||f==="cssFloat"?typeof g.styleFloat>"u"?"cssFloat":"styleFloat":f;g.setProperty(p,u[f])}return s}var i=t.document.createElement("div"),h=typeof i.style.opacity=="string",A=typeof i.style.filter=="string",a=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,o=function(s){return s};h?o=function(s,u){return s.style.opacity=u,s}:A&&(o=function(s,u){var g=s.style;return s.currentStyle&&!s.currentStyle.hasLayout&&(g.zoom=1),a.test(g.filter)?(u=u>=.9999?"":"alpha(opacity="+u*100+")",g.filter=g.filter.replace(a,u)):g.filter+=" alpha(opacity="+u*100+")",s}),t.util.setStyle=c}(),function(){var c=Array.prototype.slice;function i(y){return typeof y=="string"?t.document.getElementById(y):y}var h,A=function(y){return c.call(y,0)};try{h=A(t.document.childNodes)instanceof Array}catch{}h||(A=function(y){for(var E=new Array(y.length),w=y.length;w--;)E[w]=y[w];return E});function a(y,E){var w=t.document.createElement(y);for(var I in E)I==="class"?w.className=E[I]:I==="for"?w.htmlFor=E[I]:w.setAttribute(I,E[I]);return w}function o(y,E){y&&(" "+y.className+" ").indexOf(" "+E+" ")===-1&&(y.className+=(y.className?" ":"")+E)}function s(y,E,w){return typeof E=="string"&&(E=a(E,w)),y.parentNode&&y.parentNode.replaceChild(E,y),E.appendChild(y),E}function u(y){for(var E=0,w=0,I=t.document.documentElement,S=t.document.body||{scrollLeft:0,scrollTop:0};y&&(y.parentNode||y.host)&&(y=y.parentNode||y.host,y===t.document?(E=S.scrollLeft||I.scrollLeft||0,w=S.scrollTop||I.scrollTop||0):(E+=y.scrollLeft||0,w+=y.scrollTop||0),!(y.nodeType===1&&y.style.position==="fixed")););return{left:E,top:w}}function g(y){var E,w=y&&y.ownerDocument,I={left:0,top:0},S={left:0,top:0},D,R={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!w)return S;for(var J in R)S[R[J]]+=parseInt(f(y,J),10)||0;return E=w.documentElement,typeof y.getBoundingClientRect<"u"&&(I=y.getBoundingClientRect()),D=u(y),{left:I.left+D.left-(E.clientLeft||0)+S.left,top:I.top+D.top-(E.clientTop||0)+S.top}}var f;t.document.defaultView&&t.document.defaultView.getComputedStyle?f=function(y,E){var w=t.document.defaultView.getComputedStyle(y,null);return w?w[E]:void 0}:f=function(y,E){var w=y.style[E];return!w&&y.currentStyle&&(w=y.currentStyle[E]),w},function(){var y=t.document.documentElement.style,E="userSelect"in y?"userSelect":"MozUserSelect"in y?"MozUserSelect":"WebkitUserSelect"in y?"WebkitUserSelect":"KhtmlUserSelect"in y?"KhtmlUserSelect":"";function w(S){return typeof S.onselectstart<"u"&&(S.onselectstart=t.util.falseFunction),E?S.style[E]="none":typeof S.unselectable=="string"&&(S.unselectable="on"),S}function I(S){return typeof S.onselectstart<"u"&&(S.onselectstart=null),E?S.style[E]="":typeof S.unselectable=="string"&&(S.unselectable=""),S}t.util.makeElementUnselectable=w,t.util.makeElementSelectable=I}();function p(y){var E=t.jsdomImplForWrapper(y);return E._canvas||E._image}function v(y){if(t.isLikelyNode){var E=t.jsdomImplForWrapper(y);E&&(E._image=null,E._canvas=null,E._currentSrc=null,E._attributes=null,E._classList=null)}}function C(y,E){y.imageSmoothingEnabled=y.imageSmoothingEnabled||y.webkitImageSmoothingEnabled||y.mozImageSmoothingEnabled||y.msImageSmoothingEnabled||y.oImageSmoothingEnabled,y.imageSmoothingEnabled=E}t.util.setImageSmoothing=C,t.util.getById=i,t.util.toArray=A,t.util.addClass=o,t.util.makeElement=a,t.util.wrapElement=s,t.util.getScrollLeftTop=u,t.util.getElementOffset=g,t.util.getNodeCanvas=p,t.util.cleanUpJsdomNode=v}(),function(){function c(A,a){return A+(/\?/.test(A)?"&":"?")+a}function i(){}function h(A,a){a||(a={});var o=a.method?a.method.toUpperCase():"GET",s=a.onComplete||function(){},u=new t.window.XMLHttpRequest,g=a.body||a.parameters;return u.onreadystatechange=function(){u.readyState===4&&(s(u),u.onreadystatechange=i)},o==="GET"&&(g=null,typeof a.parameters=="string"&&(A=c(A,a.parameters))),u.open(o,A,!0),(o==="POST"||o==="PUT")&&u.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),u.send(g),u}t.util.request=h}(),t.log=console.log,t.warn=console.warn,function(){var c=t.util.object.extend,i=t.util.object.clone,h=[];t.util.object.extend(h,{cancelAll:function(){var p=this.splice(0);return p.forEach(function(v){v.cancel()}),p},cancelByCanvas:function(p){if(!p)return[];var v=this.filter(function(C){return typeof C.target=="object"&&C.target.canvas===p});return v.forEach(function(C){C.cancel()}),v},cancelByTarget:function(p){var v=this.findAnimationsByTarget(p);return v.forEach(function(C){C.cancel()}),v},findAnimationIndex:function(p){return this.indexOf(this.findAnimation(p))},findAnimation:function(p){return this.find(function(v){return v.cancel===p})},findAnimationsByTarget:function(p){return p?this.filter(function(v){return v.target===p}):[]}});function A(){return!1}function a(p,v,C,y){return-C*Math.cos(p/y*(Math.PI/2))+C+v}function o(p){p||(p={});var v=!1,C,y=function(){var E=t.runningAnimations.indexOf(C);return E>-1&&t.runningAnimations.splice(E,1)[0]};return C=c(i(p),{cancel:function(){return v=!0,y()},currentValue:"startValue"in p?p.startValue:0,completionRate:0,durationRate:0}),t.runningAnimations.push(C),g(function(E){var w=E||+new Date,I=p.duration||500,S=w+I,D,R=p.onChange||A,J=p.abort||A,ee=p.onComplete||A,Z=p.easing||a,te="startValue"in p?p.startValue.length>0:!1,re="startValue"in p?p.startValue:0,oe="endValue"in p?p.endValue:100,H=p.byValue||(te?re.map(function(L,B){return oe[B]-re[B]}):oe-re);p.onStart&&p.onStart(),function L(B){D=B||+new Date;var b=D>S?I:D-w,Q=b/I,T=te?re.map(function(_,x){return Z(b,re[x],H[x],I)}):Z(b,re,H,I),M=Math.abs(te?(T[0]-re[0])/H[0]:(T-re)/H);if(C.currentValue=te?T.slice():T,C.completionRate=M,C.durationRate=Q,!v){if(J(T,M,Q)){y();return}if(D>S){C.currentValue=te?oe.slice():oe,C.completionRate=1,C.durationRate=1,R(te?oe.slice():oe,1,1),ee(oe,1,1),y();return}else R(T,M,Q),g(L)}}(w)}),C.cancel}var s=t.window.requestAnimationFrame||t.window.webkitRequestAnimationFrame||t.window.mozRequestAnimationFrame||t.window.oRequestAnimationFrame||t.window.msRequestAnimationFrame||function(p){return t.window.setTimeout(p,1e3/60)},u=t.window.cancelAnimationFrame||t.window.clearTimeout;function g(){return s.apply(t.window,arguments)}function f(){return u.apply(t.window,arguments)}t.util.animate=o,t.util.requestAnimFrame=g,t.util.cancelAnimFrame=f,t.runningAnimations=h}(),function(){function c(h,A,a){var o="rgba("+parseInt(h[0]+a*(A[0]-h[0]),10)+","+parseInt(h[1]+a*(A[1]-h[1]),10)+","+parseInt(h[2]+a*(A[2]-h[2]),10);return o+=","+(h&&A?parseFloat(h[3]+a*(A[3]-h[3])):1),o+=")",o}function i(h,A,a,o){var s=new t.Color(h).getSource(),u=new t.Color(A).getSource(),g=o.onComplete,f=o.onChange;return o=o||{},t.util.animate(t.util.object.extend(o,{duration:a||500,startValue:s,endValue:u,byValue:u,easing:function(p,v,C,y){var E=o.colorEasing?o.colorEasing(p,y):1-Math.cos(p/y*(Math.PI/2));return c(v,C,E)},onComplete:function(p,v,C){if(g)return g(c(u,u,0),v,C)},onChange:function(p,v,C){if(f){if(Array.isArray(p))return f(c(p,p,0),v,C);f(p,v,C)}}}))}t.util.animateColor=i}(),function(){function c(B,b,Q,T){return B-1&&q>-1&&q-1)&&(x="stroke")}else{if(_==="href"||_==="xlink:href"||_==="font")return x;if(_==="imageSmoothing")return x==="optimizeQuality";N=$?x.map(o):o(x,F)}}return!$&&isNaN(N)?x:N}function S(_){return new RegExp("^("+_.join("|")+")\\b","i")}function D(_){for(var x in C)if(!(typeof _[C[x]]>"u"||_[x]==="")){if(typeof _[x]>"u"){if(!i.Object.prototype[x])continue;_[x]=i.Object.prototype[x]}if(_[x].indexOf("url(")!==0){var O=new i.Color(_[x]);_[x]=O.setAlpha(a(O.getAlpha()*_[C[x]],2)).toRgba()}}return _}function R(_,x){var O,F=[],$,N,X;for(N=0,X=x.length;N1;)ve.shift(),Ee=i.util.multiplyTransformMatrices(Ee,ve[0]);return Ee}}();function J(_,x){var O,F;_.replace(/;\s*$/,"").split(";").forEach(function($){var N=$.split(":");O=N[0].trim().toLowerCase(),F=N[1].trim(),x[O]=F})}function ee(_,x){var O,F;for(var $ in _)typeof _[$]>"u"||(O=$.toLowerCase(),F=_[$],x[O]=F)}function Z(_,x){var O={};for(var F in i.cssRules[x])if(te(_,F.split(" ")))for(var $ in i.cssRules[x][F])O[$]=i.cssRules[x][F][$];return O}function te(_,x){var O,F=!0;return O=oe(_,x.pop()),O&&x.length&&(F=re(_,x)),O&&F&&x.length===0}function re(_,x){for(var O,F=!0;_.parentNode&&_.parentNode.nodeType===1&&x.length;)F&&(O=x.pop()),_=_.parentNode,F=oe(_,O);return x.length===0}function oe(_,x){var O=_.nodeName,F=_.getAttribute("class"),$=_.getAttribute("id"),N,X;if(N=new RegExp("^"+O,"i"),x=x.replace(N,""),$&&x.length&&(N=new RegExp("#"+$+"(?![a-zA-Z\\-]+)","i"),x=x.replace(N,"")),F&&x.length)for(F=F.split(" "),X=F.length;X--;)N=new RegExp("\\."+F[X]+"(?![a-zA-Z\\-]+)","i"),x=x.replace(N,"");return x.length===0}function H(_,x){var O;if(_.getElementById&&(O=_.getElementById(x)),O)return O;var F,$,N,X=_.getElementsByTagName("*");for($=0,N=X.length;$F?F:O),V.meetOrSlice==="slice"&&(F=O=O>F?O:F),ve=z.width-X*O,Ee=z.height-q*O,V.alignX==="Mid"&&(ve/=2),V.alignY==="Mid"&&(Ee/=2),V.alignX==="Min"&&(ve=0),V.alignY==="Min"&&(Ee=0)),O===1&&F===1&&$===0&&N===0&&W===0&&j===0)return z;if((W||j)&&_.parentNode.nodeName!=="#document"&&(fe=" translate("+o(W)+" "+o(j)+") "),ie=fe+" matrix("+O+" 0 0 "+F+" "+($*O+ve)+" "+(N*F+Ee)+") ",_.nodeName==="svg"){for(G=_.ownerDocument.createElementNS(i.svgNS,"g");_.firstChild;)G.appendChild(_.firstChild);_.appendChild(G)}else G=_,G.removeAttribute("x"),G.removeAttribute("y"),ie=G.getAttribute("transform")+ie;return G.setAttribute("transform",ie),z}function Q(_,x){for(;_&&(_=_.parentNode);)if(_.nodeName&&x.test(_.nodeName.replace("svg:",""))&&!_.getAttribute("instantiated_by_use"))return!0;return!1}i.parseSVGDocument=function(_,x,O,F){if(_){L(_);var $=i.Object.__uid++,N,X,q=b(_),ie=i.util.toArray(_.getElementsByTagName("*"));if(q.crossOrigin=F&&F.crossOrigin,q.svgUid=$,ie.length===0&&i.isLikelyNode){ie=_.selectNodes('//*[name(.)!="svg"]');var G=[];for(N=0,X=ie.length;N"u"&&(O=_.getAttribute("svgUid")),_.parentNode&&i.svgValidParentsRegEx.test(_.parentNode.nodeName)&&($=i.parseAttributes(_.parentNode,x,O));var q=x.reduce(function(V,se){return F=_.getAttribute(se),F&&(V[se]=F),V},{}),ie=h(Z(_,O),i.parseStyleAttribute(_));q=h(q,ie),ie[E]&&_.setAttribute(E,ie[E]),N=X=$.fontSize||i.Text.DEFAULT_SVG_FONT_SIZE,q[y]&&(q[y]=N=o(q[y],X));var G,P,Y={};for(var W in q)G=w(W),P=I(G,q[W],$,N),Y[G]=P;Y&&Y.font&&i.parseFontDeclaration(Y.font,Y);var j=h($,Y);return i.svgValidParentsRegEx.test(_.nodeName)?j:D(j)}},parseElements:function(_,x,O,F,$){new i.ElementsParser(_,x,O,F,$).parse()},parseStyleAttribute:function(_){var x={},O=_.getAttribute("style");return O&&(typeof O=="string"?J(O,x):ee(O,x)),x},parsePointsAttribute:function(_){if(!_)return null;_=_.replace(/,/g," ").trim(),_=_.split(/\s+/);var x=[],O,F;for(O=0,F=_.length;OA.x&&this.y>A.y},gte:function(A){return this.x>=A.x&&this.y>=A.y},lerp:function(A,a){return typeof a>"u"&&(a=.5),a=Math.max(Math.min(1,a),0),new h(this.x+(A.x-this.x)*a,this.y+(A.y-this.y)*a)},distanceFrom:function(A){var a=this.x-A.x,o=this.y-A.y;return Math.sqrt(a*a+o*o)},midPointFrom:function(A){return this.lerp(A)},min:function(A){return new h(Math.min(this.x,A.x),Math.min(this.y,A.y))},max:function(A){return new h(Math.max(this.x,A.x),Math.max(this.y,A.y))},toString:function(){return this.x+","+this.y},setXY:function(A,a){return this.x=A,this.y=a,this},setX:function(A){return this.x=A,this},setY:function(A){return this.y=A,this},setFromPoint:function(A){return this.x=A.x,this.y=A.y,this},swap:function(A){var a=this.x,o=this.y;this.x=A.x,this.y=A.y,A.x=a,A.y=o},clone:function(){return new h(this.x,this.y)}}}(e),function(c){var i=c.fabric||(c.fabric={});if(i.Intersection){i.warn("fabric.Intersection is already defined");return}function h(A){this.status=A,this.points=[]}i.Intersection=h,i.Intersection.prototype={constructor:h,appendPoint:function(A){return this.points.push(A),this},appendPoints:function(A){return this.points=this.points.concat(A),this}},i.Intersection.intersectLineLine=function(A,a,o,s){var u,g=(s.x-o.x)*(A.y-o.y)-(s.y-o.y)*(A.x-o.x),f=(a.x-A.x)*(A.y-o.y)-(a.y-A.y)*(A.x-o.x),p=(s.y-o.y)*(a.x-A.x)-(s.x-o.x)*(a.y-A.y);if(p!==0){var v=g/p,C=f/p;0<=v&&v<=1&&0<=C&&C<=1?(u=new h("Intersection"),u.appendPoint(new i.Point(A.x+v*(a.x-A.x),A.y+v*(a.y-A.y)))):u=new h}else g===0||f===0?u=new h("Coincident"):u=new h("Parallel");return u},i.Intersection.intersectLinePolygon=function(A,a,o){var s=new h,u=o.length,g,f,p,v;for(v=0;v0&&(s.status="Intersection"),s},i.Intersection.intersectPolygonPolygon=function(A,a){var o=new h,s=A.length,u;for(u=0;u0&&(o.status="Intersection"),o},i.Intersection.intersectPolygonRectangle=function(A,a,o){var s=a.min(o),u=a.max(o),g=new i.Point(u.x,s.y),f=new i.Point(s.x,u.y),p=h.intersectLinePolygon(s,g,A),v=h.intersectLinePolygon(g,u,A),C=h.intersectLinePolygon(u,f,A),y=h.intersectLinePolygon(f,s,A),E=new h;return E.appendPoints(p.points),E.appendPoints(v.points),E.appendPoints(C.points),E.appendPoints(y.points),E.points.length>0&&(E.status="Intersection"),E}}(e),function(c){var i=c.fabric||(c.fabric={});if(i.Color){i.warn("fabric.Color is already defined.");return}function h(a){a?this._tryParsingColor(a):this.setSource([0,0,0,1])}i.Color=h,i.Color.prototype={_tryParsingColor:function(a){var o;a in h.colorNameMap&&(a=h.colorNameMap[a]),a==="transparent"&&(o=[255,255,255,0]),o||(o=h.sourceFromHex(a)),o||(o=h.sourceFromRgb(a)),o||(o=h.sourceFromHsl(a)),o||(o=[0,0,0,1]),o&&this.setSource(o)},_rgbToHsl:function(a,o,s){a/=255,o/=255,s/=255;var u,g,f,p=i.util.array.max([a,o,s]),v=i.util.array.min([a,o,s]);if(f=(p+v)/2,p===v)u=g=0;else{var C=p-v;switch(g=f>.5?C/(2-p-v):C/(p+v),p){case a:u=(o-s)/C+(o1&&(s-=1),s<1/6?a+(o-a)*6*s:s<1/2?o:s<2/3?a+(o-a)*(2/3-s)*6:a}i.Color.fromRgb=function(a){return h.fromSource(h.sourceFromRgb(a))},i.Color.sourceFromRgb=function(a){var o=a.match(h.reRGBa);if(o){var s=parseInt(o[1],10)/(/%$/.test(o[1])?100:1)*(/%$/.test(o[1])?255:1),u=parseInt(o[2],10)/(/%$/.test(o[2])?100:1)*(/%$/.test(o[2])?255:1),g=parseInt(o[3],10)/(/%$/.test(o[3])?100:1)*(/%$/.test(o[3])?255:1);return[parseInt(s,10),parseInt(u,10),parseInt(g,10),o[4]?parseFloat(o[4]):1]}},i.Color.fromRgba=h.fromRgb,i.Color.fromHsl=function(a){return h.fromSource(h.sourceFromHsl(a))},i.Color.sourceFromHsl=function(a){var o=a.match(h.reHSLa);if(o){var s=(parseFloat(o[1])%360+360)%360/360,u=parseFloat(o[2])/(/%$/.test(o[2])?100:1),g=parseFloat(o[3])/(/%$/.test(o[3])?100:1),f,p,v;if(u===0)f=p=v=g;else{var C=g<=.5?g*(u+1):g+u-g*u,y=g*2-C;f=A(y,C,s+1/3),p=A(y,C,s),v=A(y,C,s-1/3)}return[Math.round(f*255),Math.round(p*255),Math.round(v*255),o[4]?parseFloat(o[4]):1]}},i.Color.fromHsla=h.fromHsl,i.Color.fromHex=function(a){return h.fromSource(h.sourceFromHex(a))},i.Color.sourceFromHex=function(a){if(a.match(h.reHex)){var o=a.slice(a.indexOf("#")+1),s=o.length===3||o.length===4,u=o.length===8||o.length===4,g=s?o.charAt(0)+o.charAt(0):o.substring(0,2),f=s?o.charAt(1)+o.charAt(1):o.substring(2,4),p=s?o.charAt(2)+o.charAt(2):o.substring(4,6),v=u?s?o.charAt(3)+o.charAt(3):o.substring(6,8):"FF";return[parseInt(g,16),parseInt(f,16),parseInt(p,16),parseFloat((parseInt(v,16)/255).toFixed(2))]}},i.Color.fromSource=function(a){var o=new h;return o.setSource(a),o}}(e),function(c){var i=c.fabric||(c.fabric={}),h=["e","se","s","sw","w","nw","n","ne","e"],A=["ns","nesw","ew","nwse"],a={},o="left",s="top",u="right",g="bottom",f="center",p={top:g,bottom:s,left:u,right:o,center:f},v=i.util.radiansToDegrees,C=Math.sign||function(G){return(G>0)-(G<0)||+G};function y(G,P){var Y=G.angle+v(Math.atan2(P.y,P.x))+360;return Math.round(Y%360/45)}function E(G,P){var Y=P.transform.target,W=Y.canvas,j=i.util.object.clone(P);j.target=Y,W&&W.fire("object:"+G,j),Y.fire(G,P)}function w(G,P){var Y=P.canvas,W=Y.uniScaleKey,j=G[W];return Y.uniformScaling&&!j||!Y.uniformScaling&&j}function I(G){return G.originX===f&&G.originY===f}function S(G,P,Y){var W=G.lockScalingX,j=G.lockScalingY;return!!(W&&j||!P&&(W||j)&&Y||W&&P==="x"||j&&P==="y")}function D(G,P,Y){var W="not-allowed",j=w(G,Y),V="";if(P.x!==0&&P.y===0?V="x":P.x===0&&P.y!==0&&(V="y"),S(Y,V,j))return W;var se=y(Y,P);return h[se]+"-resize"}function R(G,P,Y){var W="not-allowed";if(P.x!==0&&Y.lockSkewingY||P.y!==0&&Y.lockSkewingX)return W;var j=y(Y,P)%4;return A[j]+"-resize"}function J(G,P,Y){return G[Y.canvas.altActionKey]?a.skewCursorStyleHandler(G,P,Y):a.scaleCursorStyleHandler(G,P,Y)}function ee(G,P,Y){var W=G[Y.canvas.altActionKey];if(P.x===0)return W?"skewX":"scaleY";if(P.y===0)return W?"skewY":"scaleX"}function Z(G,P,Y){return Y.lockRotation?"not-allowed":P.cursorStyle}function te(G,P,Y,W){return{e:G,transform:P,pointer:{x:Y,y:W}}}function re(G){return function(P,Y,W,j){var V=Y.target,se=V.getCenterPoint(),ge=V.translateToOriginPoint(se,Y.originX,Y.originY),he=G(P,Y,W,j);return V.setPositionByOrigin(ge,Y.originX,Y.originY),he}}function oe(G,P){return function(Y,W,j,V){var se=P(Y,W,j,V);return se&&E(G,te(Y,W,j,V)),se}}function H(G,P,Y,W,j){var V=G.target,se=V.controls[G.corner],ge=V.canvas.getZoom(),he=V.padding/ge,z=V.toLocalPoint(new i.Point(W,j),P,Y);return z.x>=he&&(z.x-=he),z.x<=-he&&(z.x+=he),z.y>=he&&(z.y-=he),z.y<=he&&(z.y+=he),z.x-=se.offsetX,z.y-=se.offsetY,z}function L(G){return G.flipX!==G.flipY}function B(G,P,Y,W,j){if(G[P]!==0){var V=G._getTransformedDimensions()[W],se=j/V*G[Y];G.set(Y,se)}}function b(G,P,Y,W){var j=P.target,V=j._getTransformedDimensions(0,j.skewY),se=H(P,P.originX,P.originY,Y,W),ge=Math.abs(se.x*2)-V.x,he=j.skewX,z;ge<2?z=0:(z=v(Math.atan2(ge/j.scaleX,V.y/j.scaleY)),P.originX===o&&P.originY===g&&(z=-z),P.originX===u&&P.originY===s&&(z=-z),L(j)&&(z=-z));var fe=he!==z;if(fe){var ve=j._getTransformedDimensions().y;j.set("skewX",z),B(j,"skewY","scaleY","y",ve)}return fe}function Q(G,P,Y,W){var j=P.target,V=j._getTransformedDimensions(j.skewX,0),se=H(P,P.originX,P.originY,Y,W),ge=Math.abs(se.y*2)-V.y,he=j.skewY,z;ge<2?z=0:(z=v(Math.atan2(ge/j.scaleY,V.x/j.scaleX)),P.originX===o&&P.originY===g&&(z=-z),P.originX===u&&P.originY===s&&(z=-z),L(j)&&(z=-z));var fe=he!==z;if(fe){var ve=j._getTransformedDimensions().x;j.set("skewY",z),B(j,"skewX","scaleX","x",ve)}return fe}function T(G,P,Y,W){var j=P.target,V=j.skewX,se,ge=P.originY;if(j.lockSkewingX)return!1;if(V===0){var he=H(P,f,f,Y,W);he.x>0?se=o:se=u}else V>0&&(se=ge===s?o:u),V<0&&(se=ge===s?u:o),L(j)&&(se=se===o?u:o);P.originX=se;var z=oe("skewing",re(b));return z(G,P,Y,W)}function M(G,P,Y,W){var j=P.target,V=j.skewY,se,ge=P.originX;if(j.lockSkewingY)return!1;if(V===0){var he=H(P,f,f,Y,W);he.y>0?se=s:se=g}else V>0&&(se=ge===o?s:g),V<0&&(se=ge===o?g:s),L(j)&&(se=se===s?g:s);P.originY=se;var z=oe("skewing",re(Q));return z(G,P,Y,W)}function _(G,P,Y,W){var j=P,V=j.target,se=V.translateToOriginPoint(V.getCenterPoint(),j.originX,j.originY);if(V.lockRotation)return!1;var ge=Math.atan2(j.ey-se.y,j.ex-se.x),he=Math.atan2(W-se.y,Y-se.x),z=v(he-ge+j.theta),fe=!0;if(V.snapAngle>0){var ve=V.snapAngle,Ee=V.snapThreshold||ve,Oe=Math.ceil(z/ve)*ve,Ie=Math.floor(z/ve)*ve;Math.abs(z-Ie)C?(D=v,s.scale(1,C/v),S=g*v/C):C>v?(D=C,s.scale(v/C,1),I=u*C/v):D=v,s.lineWidth=1,s.beginPath(),s.arc(I,S,D/2,0,2*Math.PI,!1),s[E](),w&&s.stroke(),s.restore()}function o(s,u,g,f,p){f=f||{};var v=this.sizeX||f.cornerSize||p.cornerSize,C=this.sizeY||f.cornerSize||p.cornerSize,y=typeof f.transparentCorners<"u"?f.transparentCorners:p.transparentCorners,E=y?"stroke":"fill",w=!y&&(f.cornerStrokeColor||p.cornerStrokeColor),I=v/2,S=C/2;s.save(),s.fillStyle=f.cornerColor||p.cornerColor,s.strokeStyle=f.cornerStrokeColor||p.cornerStrokeColor,s.lineWidth=1,s.translate(u,g),s.rotate(h(p.angle)),s[E+"Rect"](-I,-S,v,C),w&&s.strokeRect(-I,-S,v,C),s.restore()}A.renderCircleControl=a,A.renderSquareControl=o}(e),function(c){var i=c.fabric||(c.fabric={});function h(A){for(var a in A)this[a]=A[a]}i.Control=h,i.Control.prototype={visible:!0,actionName:"scale",angle:0,x:0,y:0,offsetX:0,offsetY:0,sizeX:null,sizeY:null,touchSizeX:null,touchSizeY:null,cursorStyle:"crosshair",withConnection:!1,actionHandler:function(){},mouseDownHandler:function(){},mouseUpHandler:function(){},getActionHandler:function(){return this.actionHandler},getMouseDownHandler:function(){return this.mouseDownHandler},getMouseUpHandler:function(){return this.mouseUpHandler},cursorStyleHandler:function(A,a){return a.cursorStyle},getActionName:function(A,a){return a.actionName},getVisibility:function(A,a){var o=A._controlsVisibility;return o&&typeof o[a]<"u"?o[a]:this.visible},setVisibility:function(A){this.visible=A},positionHandler:function(A,a){var o=i.util.transformPoint({x:this.x*A.x+this.offsetX,y:this.y*A.y+this.offsetY},a);return o},calcCornerCoords:function(A,a,o,s,u){var g,f,p,v,C=u?this.touchSizeX:this.sizeX,y=u?this.touchSizeY:this.sizeY;if(C&&y&&C!==y){var E=Math.atan2(y,C),w=Math.sqrt(C*C+y*y)/2,I=E-i.util.degreesToRadians(A),S=Math.PI/2-E-i.util.degreesToRadians(A);g=w*i.util.cos(I),f=w*i.util.sin(I),p=w*i.util.cos(S),v=w*i.util.sin(S)}else{var D=C&&y?C:a;w=D*.7071067812;var I=i.util.degreesToRadians(45-A);g=p=w*i.util.cos(I),f=v=w*i.util.sin(I)}return{tl:{x:o-v,y:s-p},tr:{x:o+g,y:s-f},bl:{x:o-g,y:s+f},br:{x:o+v,y:s+p}}},render:function(A,a,o,s,u){switch(s=s||{},s.cornerStyle||u.cornerStyle){case"circle":i.controlsUtils.renderCircleControl.call(this,A,a,o,s,u);break;default:i.controlsUtils.renderSquareControl.call(this,A,a,o,s,u)}}}}(e),function(){function c(o,s){var u=o.getAttribute("style"),g=o.getAttribute("offset")||0,f,p,v,C;if(g=parseFloat(g)/(/%$/.test(g)?100:1),g=g<0?0:g>1?1:g,u){var y=u.split(/\s*;\s*/);for(y[y.length-1]===""&&y.pop(),C=y.length;C--;){var E=y[C].split(/\s*:\s*/),w=E[0].trim(),I=E[1].trim();w==="stop-color"?f=I:w==="stop-opacity"&&(v=I)}}return f||(f=o.getAttribute("stop-color")||"rgb(0,0,0)"),v||(v=o.getAttribute("stop-opacity")),f=new t.Color(f),p=f.getAlpha(),v=isNaN(parseFloat(v))?1:parseFloat(v),v*=p*s,{offset:g,color:f.toRgb(),opacity:v}}function i(o){return{x1:o.getAttribute("x1")||0,y1:o.getAttribute("y1")||0,x2:o.getAttribute("x2")||"100%",y2:o.getAttribute("y2")||0}}function h(o){return{x1:o.getAttribute("fx")||o.getAttribute("cx")||"50%",y1:o.getAttribute("fy")||o.getAttribute("cy")||"50%",r1:0,x2:o.getAttribute("cx")||"50%",y2:o.getAttribute("cy")||"50%",r2:o.getAttribute("r")||"50%"}}var A=t.util.object.clone;t.Gradient=t.util.createClass({offsetX:0,offsetY:0,gradientTransform:null,gradientUnits:"pixels",type:"linear",initialize:function(o){o||(o={}),o.coords||(o.coords={});var s,u=this;Object.keys(o).forEach(function(g){u[g]=o[g]}),this.id?this.id+="_"+t.Object.__uid++:this.id=t.Object.__uid++,s={x1:o.coords.x1||0,y1:o.coords.y1||0,x2:o.coords.x2||0,y2:o.coords.y2||0},this.type==="radial"&&(s.r1=o.coords.r1||0,s.r2=o.coords.r2||0),this.coords=s,this.colorStops=o.colorStops.slice()},addColorStop:function(o){for(var s in o){var u=new t.Color(o[s]);this.colorStops.push({offset:parseFloat(s),color:u.toRgb(),opacity:u.getAlpha()})}return this},toObject:function(o){var s={type:this.type,coords:this.coords,colorStops:this.colorStops,offsetX:this.offsetX,offsetY:this.offsetY,gradientUnits:this.gradientUnits,gradientTransform:this.gradientTransform?this.gradientTransform.concat():this.gradientTransform};return t.util.populateWithProperties(this,s,o),s},toSVG:function(o,p){var u=A(this.coords,!0),g,f,p=p||{},v,C,y=A(this.colorStops,!0),E=u.r1>u.r2,w=this.gradientTransform?this.gradientTransform.concat():t.iMatrix.concat(),I=-this.offsetX,S=-this.offsetY,D=!!p.additionalTransform,R=this.gradientUnits==="pixels"?"userSpaceOnUse":"objectBoundingBox";if(y.sort(function(re,oe){return re.offset-oe.offset}),R==="objectBoundingBox"?(I/=o.width,S/=o.height):(I+=o.width/2,S+=o.height/2),o.type==="path"&&this.gradientUnits!=="percentage"&&(I-=o.pathOffset.x,S-=o.pathOffset.y),w[4]-=I,w[5]-=S,C='id="SVGID_'+this.id+'" gradientUnits="'+R+'"',C+=' gradientTransform="'+(D?p.additionalTransform+" ":"")+t.util.matrixToSVG(w)+'" ',this.type==="linear"?v=[" +`),f=-1,p=0,v={},C=0;C0?Oe-=2*O:_===1&&Oe<0&&(Oe+=2*O);for(var Ie=Math.ceil(Math.abs(Oe/O*2)),nt=[],Ue=Oe/Ie,Xn=8/3*Math.sin(Ue/4)*Math.sin(Ue/4)/Math.sin(Ue/2),Ti=Ee+Ue,Jt=0;Jt=M?_-M:2*Math.PI-(M-_)}function s(B,b,Q,T,M,_,x,O){var F;if(t.cachesBoundsOfCurve&&(F=c.call(arguments),t.boundsOfCurveCache[F]))return t.boundsOfCurveCache[F];var $=Math.sqrt,N=Math.min,X=Math.max,q=Math.abs,ie=[],G=[[],[]],P,Y,W,j,V,se,ge,he;Y=6*B-12*Q+6*M,P=-3*B+9*Q-9*M+3*x,W=3*Q-3*B;for(var z=0;z<2;++z){if(z>0&&(Y=6*b-12*T+6*_,P=-3*b+9*T-9*_+3*O,W=3*T-3*b),q(P)<1e-12){if(q(Y)<1e-12)continue;j=-W/Y,01e-4;)x=M(Q),N=Q,O=f(_.x,_.y,x.x,x.y),O+T>b?(Q-=F,F/=2):(_=x,Q+=F,T+=O);return x.angle=$(N),x}function te(B){for(var b=0,Q=B.length,T,M=0,_=0,x=0,O=0,F=[],$,N,X,q=0;q0&&Tge)for(var z=1,fe=P.length;z2;for(b=b||0,$&&(O=B[2].x<_.x?-1:B[2].x===_.x?0:1,F=B[2].y<_.y?-1:B[2].y===_.y?0:1),Q.push(["M",M.x-O*b,M.y-F*b]),T=1;TB[T-2].x?1:M.x===B[T-2].x?0:-1,F=M.y>B[T-2].y?1:M.y===B[T-2].y?0:-1),Q.push(["L",M.x+O*b,M.y+F*b]),Q}function L(B,b,Q){return Q&&(b=t.util.multiplyTransformMatrices(b,[1,0,0,1,-Q.x,-Q.y])),B.map(function(T){for(var M=T.slice(0),_={},x=1;x=f})}function d(s,u){return o(s,u,function(g,f){return g/g,">")}function d(o){var s=0,u,g=[];for(s=0,u;s57343)return o.charAt(s);if(55296<=u&&u<=56319){if(o.length<=s+1)throw"High surrogate without following low surrogate";var g=o.charCodeAt(s+1);if(56320>g||g>57343)throw"High surrogate without following low surrogate";return o.charAt(s)+o.charAt(s+1)}if(s===0)throw"Low surrogate without preceding high surrogate";var f=o.charCodeAt(s-1);if(55296>f||f>56319)throw"Low surrogate without preceding high surrogate";return!1}t.util.string={camelize:c,capitalize:i,escapeXml:h,graphemeSplit:d}}(),function(){var c=Array.prototype.slice,i=function(){},h=function(){for(var u in{toString:1})if(u==="toString")return!1;return!0}(),d=function(u,g,f){for(var p in g)p in u.prototype&&typeof u.prototype[p]=="function"&&(g[p]+"").indexOf("callSuper")>-1?u.prototype[p]=function(v){return function(){var C=this.constructor.superclass;this.constructor.superclass=f;var y=g[v].apply(this,arguments);if(this.constructor.superclass=C,v!=="initialize")return y}}(p):u.prototype[p]=g[p],h&&(g.toString!==Object.prototype.toString&&(u.prototype.toString=g.toString),g.valueOf!==Object.prototype.valueOf&&(u.prototype.valueOf=g.valueOf))};function a(){}function o(u){for(var g=null,f=this;f.constructor.superclass;){var p=f.constructor.superclass.prototype[u];if(f[u]!==p){g=p;break}f=f.constructor.superclass.prototype}if(g)return arguments.length>1?g.apply(this,c.call(arguments,1)):g.call(this)}function s(){var u=null,g=c.call(arguments,0);typeof g[0]=="function"&&(u=g.shift());function f(){this.initialize.apply(this,arguments)}f.superclass=u,f.subclasses=[],u&&(a.prototype=u.prototype,f.prototype=new a,u.subclasses.push(f));for(var p=0,v=g.length;p-1||d.pointerType==="touch"}}(),function(){function c(s,u){var g=s.style;if(!g)return s;if(typeof u=="string")return s.style.cssText+=";"+u,u.indexOf("opacity")>-1?o(s,u.match(/opacity:\s*(\d?\.?\d*)/)[1]):s;for(var f in u)if(f==="opacity")o(s,u[f]);else{var p=f==="float"||f==="cssFloat"?typeof g.styleFloat>"u"?"cssFloat":"styleFloat":f;g.setProperty(p,u[f])}return s}var i=t.document.createElement("div"),h=typeof i.style.opacity=="string",d=typeof i.style.filter=="string",a=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,o=function(s){return s};h?o=function(s,u){return s.style.opacity=u,s}:d&&(o=function(s,u){var g=s.style;return s.currentStyle&&!s.currentStyle.hasLayout&&(g.zoom=1),a.test(g.filter)?(u=u>=.9999?"":"alpha(opacity="+u*100+")",g.filter=g.filter.replace(a,u)):g.filter+=" alpha(opacity="+u*100+")",s}),t.util.setStyle=c}(),function(){var c=Array.prototype.slice;function i(y){return typeof y=="string"?t.document.getElementById(y):y}var h,d=function(y){return c.call(y,0)};try{h=d(t.document.childNodes)instanceof Array}catch{}h||(d=function(y){for(var E=new Array(y.length),w=y.length;w--;)E[w]=y[w];return E});function a(y,E){var w=t.document.createElement(y);for(var I in E)I==="class"?w.className=E[I]:I==="for"?w.htmlFor=E[I]:w.setAttribute(I,E[I]);return w}function o(y,E){y&&(" "+y.className+" ").indexOf(" "+E+" ")===-1&&(y.className+=(y.className?" ":"")+E)}function s(y,E,w){return typeof E=="string"&&(E=a(E,w)),y.parentNode&&y.parentNode.replaceChild(E,y),E.appendChild(y),E}function u(y){for(var E=0,w=0,I=t.document.documentElement,S=t.document.body||{scrollLeft:0,scrollTop:0};y&&(y.parentNode||y.host)&&(y=y.parentNode||y.host,y===t.document?(E=S.scrollLeft||I.scrollLeft||0,w=S.scrollTop||I.scrollTop||0):(E+=y.scrollLeft||0,w+=y.scrollTop||0),!(y.nodeType===1&&y.style.position==="fixed")););return{left:E,top:w}}function g(y){var E,w=y&&y.ownerDocument,I={left:0,top:0},S={left:0,top:0},D,R={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!w)return S;for(var J in R)S[R[J]]+=parseInt(f(y,J),10)||0;return E=w.documentElement,typeof y.getBoundingClientRect<"u"&&(I=y.getBoundingClientRect()),D=u(y),{left:I.left+D.left-(E.clientLeft||0)+S.left,top:I.top+D.top-(E.clientTop||0)+S.top}}var f;t.document.defaultView&&t.document.defaultView.getComputedStyle?f=function(y,E){var w=t.document.defaultView.getComputedStyle(y,null);return w?w[E]:void 0}:f=function(y,E){var w=y.style[E];return!w&&y.currentStyle&&(w=y.currentStyle[E]),w},function(){var y=t.document.documentElement.style,E="userSelect"in y?"userSelect":"MozUserSelect"in y?"MozUserSelect":"WebkitUserSelect"in y?"WebkitUserSelect":"KhtmlUserSelect"in y?"KhtmlUserSelect":"";function w(S){return typeof S.onselectstart<"u"&&(S.onselectstart=t.util.falseFunction),E?S.style[E]="none":typeof S.unselectable=="string"&&(S.unselectable="on"),S}function I(S){return typeof S.onselectstart<"u"&&(S.onselectstart=null),E?S.style[E]="":typeof S.unselectable=="string"&&(S.unselectable=""),S}t.util.makeElementUnselectable=w,t.util.makeElementSelectable=I}();function p(y){var E=t.jsdomImplForWrapper(y);return E._canvas||E._image}function v(y){if(t.isLikelyNode){var E=t.jsdomImplForWrapper(y);E&&(E._image=null,E._canvas=null,E._currentSrc=null,E._attributes=null,E._classList=null)}}function C(y,E){y.imageSmoothingEnabled=y.imageSmoothingEnabled||y.webkitImageSmoothingEnabled||y.mozImageSmoothingEnabled||y.msImageSmoothingEnabled||y.oImageSmoothingEnabled,y.imageSmoothingEnabled=E}t.util.setImageSmoothing=C,t.util.getById=i,t.util.toArray=d,t.util.addClass=o,t.util.makeElement=a,t.util.wrapElement=s,t.util.getScrollLeftTop=u,t.util.getElementOffset=g,t.util.getNodeCanvas=p,t.util.cleanUpJsdomNode=v}(),function(){function c(d,a){return d+(/\?/.test(d)?"&":"?")+a}function i(){}function h(d,a){a||(a={});var o=a.method?a.method.toUpperCase():"GET",s=a.onComplete||function(){},u=new t.window.XMLHttpRequest,g=a.body||a.parameters;return u.onreadystatechange=function(){u.readyState===4&&(s(u),u.onreadystatechange=i)},o==="GET"&&(g=null,typeof a.parameters=="string"&&(d=c(d,a.parameters))),u.open(o,d,!0),(o==="POST"||o==="PUT")&&u.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),u.send(g),u}t.util.request=h}(),t.log=console.log,t.warn=console.warn,function(){var c=t.util.object.extend,i=t.util.object.clone,h=[];t.util.object.extend(h,{cancelAll:function(){var p=this.splice(0);return p.forEach(function(v){v.cancel()}),p},cancelByCanvas:function(p){if(!p)return[];var v=this.filter(function(C){return typeof C.target=="object"&&C.target.canvas===p});return v.forEach(function(C){C.cancel()}),v},cancelByTarget:function(p){var v=this.findAnimationsByTarget(p);return v.forEach(function(C){C.cancel()}),v},findAnimationIndex:function(p){return this.indexOf(this.findAnimation(p))},findAnimation:function(p){return this.find(function(v){return v.cancel===p})},findAnimationsByTarget:function(p){return p?this.filter(function(v){return v.target===p}):[]}});function d(){return!1}function a(p,v,C,y){return-C*Math.cos(p/y*(Math.PI/2))+C+v}function o(p){p||(p={});var v=!1,C,y=function(){var E=t.runningAnimations.indexOf(C);return E>-1&&t.runningAnimations.splice(E,1)[0]};return C=c(i(p),{cancel:function(){return v=!0,y()},currentValue:"startValue"in p?p.startValue:0,completionRate:0,durationRate:0}),t.runningAnimations.push(C),g(function(E){var w=E||+new Date,I=p.duration||500,S=w+I,D,R=p.onChange||d,J=p.abort||d,ee=p.onComplete||d,Z=p.easing||a,te="startValue"in p?p.startValue.length>0:!1,re="startValue"in p?p.startValue:0,oe="endValue"in p?p.endValue:100,H=p.byValue||(te?re.map(function(L,B){return oe[B]-re[B]}):oe-re);p.onStart&&p.onStart(),function L(B){D=B||+new Date;var b=D>S?I:D-w,Q=b/I,T=te?re.map(function(_,x){return Z(b,re[x],H[x],I)}):Z(b,re,H,I),M=Math.abs(te?(T[0]-re[0])/H[0]:(T-re)/H);if(C.currentValue=te?T.slice():T,C.completionRate=M,C.durationRate=Q,!v){if(J(T,M,Q)){y();return}if(D>S){C.currentValue=te?oe.slice():oe,C.completionRate=1,C.durationRate=1,R(te?oe.slice():oe,1,1),ee(oe,1,1),y();return}else R(T,M,Q),g(L)}}(w)}),C.cancel}var s=t.window.requestAnimationFrame||t.window.webkitRequestAnimationFrame||t.window.mozRequestAnimationFrame||t.window.oRequestAnimationFrame||t.window.msRequestAnimationFrame||function(p){return t.window.setTimeout(p,1e3/60)},u=t.window.cancelAnimationFrame||t.window.clearTimeout;function g(){return s.apply(t.window,arguments)}function f(){return u.apply(t.window,arguments)}t.util.animate=o,t.util.requestAnimFrame=g,t.util.cancelAnimFrame=f,t.runningAnimations=h}(),function(){function c(h,d,a){var o="rgba("+parseInt(h[0]+a*(d[0]-h[0]),10)+","+parseInt(h[1]+a*(d[1]-h[1]),10)+","+parseInt(h[2]+a*(d[2]-h[2]),10);return o+=","+(h&&d?parseFloat(h[3]+a*(d[3]-h[3])):1),o+=")",o}function i(h,d,a,o){var s=new t.Color(h).getSource(),u=new t.Color(d).getSource(),g=o.onComplete,f=o.onChange;return o=o||{},t.util.animate(t.util.object.extend(o,{duration:a||500,startValue:s,endValue:u,byValue:u,easing:function(p,v,C,y){var E=o.colorEasing?o.colorEasing(p,y):1-Math.cos(p/y*(Math.PI/2));return c(v,C,E)},onComplete:function(p,v,C){if(g)return g(c(u,u,0),v,C)},onChange:function(p,v,C){if(f){if(Array.isArray(p))return f(c(p,p,0),v,C);f(p,v,C)}}}))}t.util.animateColor=i}(),function(){function c(B,b,Q,T){return B-1&&q>-1&&q-1)&&(x="stroke")}else{if(_==="href"||_==="xlink:href"||_==="font")return x;if(_==="imageSmoothing")return x==="optimizeQuality";N=$?x.map(o):o(x,F)}}return!$&&isNaN(N)?x:N}function S(_){return new RegExp("^("+_.join("|")+")\\b","i")}function D(_){for(var x in C)if(!(typeof _[C[x]]>"u"||_[x]==="")){if(typeof _[x]>"u"){if(!i.Object.prototype[x])continue;_[x]=i.Object.prototype[x]}if(_[x].indexOf("url(")!==0){var O=new i.Color(_[x]);_[x]=O.setAlpha(a(O.getAlpha()*_[C[x]],2)).toRgba()}}return _}function R(_,x){var O,F=[],$,N,X;for(N=0,X=x.length;N1;)ve.shift(),Ee=i.util.multiplyTransformMatrices(Ee,ve[0]);return Ee}}();function J(_,x){var O,F;_.replace(/;\s*$/,"").split(";").forEach(function($){var N=$.split(":");O=N[0].trim().toLowerCase(),F=N[1].trim(),x[O]=F})}function ee(_,x){var O,F;for(var $ in _)typeof _[$]>"u"||(O=$.toLowerCase(),F=_[$],x[O]=F)}function Z(_,x){var O={};for(var F in i.cssRules[x])if(te(_,F.split(" ")))for(var $ in i.cssRules[x][F])O[$]=i.cssRules[x][F][$];return O}function te(_,x){var O,F=!0;return O=oe(_,x.pop()),O&&x.length&&(F=re(_,x)),O&&F&&x.length===0}function re(_,x){for(var O,F=!0;_.parentNode&&_.parentNode.nodeType===1&&x.length;)F&&(O=x.pop()),_=_.parentNode,F=oe(_,O);return x.length===0}function oe(_,x){var O=_.nodeName,F=_.getAttribute("class"),$=_.getAttribute("id"),N,X;if(N=new RegExp("^"+O,"i"),x=x.replace(N,""),$&&x.length&&(N=new RegExp("#"+$+"(?![a-zA-Z\\-]+)","i"),x=x.replace(N,"")),F&&x.length)for(F=F.split(" "),X=F.length;X--;)N=new RegExp("\\."+F[X]+"(?![a-zA-Z\\-]+)","i"),x=x.replace(N,"");return x.length===0}function H(_,x){var O;if(_.getElementById&&(O=_.getElementById(x)),O)return O;var F,$,N,X=_.getElementsByTagName("*");for($=0,N=X.length;$F?F:O),V.meetOrSlice==="slice"&&(F=O=O>F?O:F),ve=z.width-X*O,Ee=z.height-q*O,V.alignX==="Mid"&&(ve/=2),V.alignY==="Mid"&&(Ee/=2),V.alignX==="Min"&&(ve=0),V.alignY==="Min"&&(Ee=0)),O===1&&F===1&&$===0&&N===0&&W===0&&j===0)return z;if((W||j)&&_.parentNode.nodeName!=="#document"&&(fe=" translate("+o(W)+" "+o(j)+") "),ie=fe+" matrix("+O+" 0 0 "+F+" "+($*O+ve)+" "+(N*F+Ee)+") ",_.nodeName==="svg"){for(G=_.ownerDocument.createElementNS(i.svgNS,"g");_.firstChild;)G.appendChild(_.firstChild);_.appendChild(G)}else G=_,G.removeAttribute("x"),G.removeAttribute("y"),ie=G.getAttribute("transform")+ie;return G.setAttribute("transform",ie),z}function Q(_,x){for(;_&&(_=_.parentNode);)if(_.nodeName&&x.test(_.nodeName.replace("svg:",""))&&!_.getAttribute("instantiated_by_use"))return!0;return!1}i.parseSVGDocument=function(_,x,O,F){if(_){L(_);var $=i.Object.__uid++,N,X,q=b(_),ie=i.util.toArray(_.getElementsByTagName("*"));if(q.crossOrigin=F&&F.crossOrigin,q.svgUid=$,ie.length===0&&i.isLikelyNode){ie=_.selectNodes('//*[name(.)!="svg"]');var G=[];for(N=0,X=ie.length;N"u"&&(O=_.getAttribute("svgUid")),_.parentNode&&i.svgValidParentsRegEx.test(_.parentNode.nodeName)&&($=i.parseAttributes(_.parentNode,x,O));var q=x.reduce(function(V,se){return F=_.getAttribute(se),F&&(V[se]=F),V},{}),ie=h(Z(_,O),i.parseStyleAttribute(_));q=h(q,ie),ie[E]&&_.setAttribute(E,ie[E]),N=X=$.fontSize||i.Text.DEFAULT_SVG_FONT_SIZE,q[y]&&(q[y]=N=o(q[y],X));var G,P,Y={};for(var W in q)G=w(W),P=I(G,q[W],$,N),Y[G]=P;Y&&Y.font&&i.parseFontDeclaration(Y.font,Y);var j=h($,Y);return i.svgValidParentsRegEx.test(_.nodeName)?j:D(j)}},parseElements:function(_,x,O,F,$){new i.ElementsParser(_,x,O,F,$).parse()},parseStyleAttribute:function(_){var x={},O=_.getAttribute("style");return O&&(typeof O=="string"?J(O,x):ee(O,x)),x},parsePointsAttribute:function(_){if(!_)return null;_=_.replace(/,/g," ").trim(),_=_.split(/\s+/);var x=[],O,F;for(O=0,F=_.length;Od.x&&this.y>d.y},gte:function(d){return this.x>=d.x&&this.y>=d.y},lerp:function(d,a){return typeof a>"u"&&(a=.5),a=Math.max(Math.min(1,a),0),new h(this.x+(d.x-this.x)*a,this.y+(d.y-this.y)*a)},distanceFrom:function(d){var a=this.x-d.x,o=this.y-d.y;return Math.sqrt(a*a+o*o)},midPointFrom:function(d){return this.lerp(d)},min:function(d){return new h(Math.min(this.x,d.x),Math.min(this.y,d.y))},max:function(d){return new h(Math.max(this.x,d.x),Math.max(this.y,d.y))},toString:function(){return this.x+","+this.y},setXY:function(d,a){return this.x=d,this.y=a,this},setX:function(d){return this.x=d,this},setY:function(d){return this.y=d,this},setFromPoint:function(d){return this.x=d.x,this.y=d.y,this},swap:function(d){var a=this.x,o=this.y;this.x=d.x,this.y=d.y,d.x=a,d.y=o},clone:function(){return new h(this.x,this.y)}}}(e),function(c){var i=c.fabric||(c.fabric={});if(i.Intersection){i.warn("fabric.Intersection is already defined");return}function h(d){this.status=d,this.points=[]}i.Intersection=h,i.Intersection.prototype={constructor:h,appendPoint:function(d){return this.points.push(d),this},appendPoints:function(d){return this.points=this.points.concat(d),this}},i.Intersection.intersectLineLine=function(d,a,o,s){var u,g=(s.x-o.x)*(d.y-o.y)-(s.y-o.y)*(d.x-o.x),f=(a.x-d.x)*(d.y-o.y)-(a.y-d.y)*(d.x-o.x),p=(s.y-o.y)*(a.x-d.x)-(s.x-o.x)*(a.y-d.y);if(p!==0){var v=g/p,C=f/p;0<=v&&v<=1&&0<=C&&C<=1?(u=new h("Intersection"),u.appendPoint(new i.Point(d.x+v*(a.x-d.x),d.y+v*(a.y-d.y)))):u=new h}else g===0||f===0?u=new h("Coincident"):u=new h("Parallel");return u},i.Intersection.intersectLinePolygon=function(d,a,o){var s=new h,u=o.length,g,f,p,v;for(v=0;v0&&(s.status="Intersection"),s},i.Intersection.intersectPolygonPolygon=function(d,a){var o=new h,s=d.length,u;for(u=0;u0&&(o.status="Intersection"),o},i.Intersection.intersectPolygonRectangle=function(d,a,o){var s=a.min(o),u=a.max(o),g=new i.Point(u.x,s.y),f=new i.Point(s.x,u.y),p=h.intersectLinePolygon(s,g,d),v=h.intersectLinePolygon(g,u,d),C=h.intersectLinePolygon(u,f,d),y=h.intersectLinePolygon(f,s,d),E=new h;return E.appendPoints(p.points),E.appendPoints(v.points),E.appendPoints(C.points),E.appendPoints(y.points),E.points.length>0&&(E.status="Intersection"),E}}(e),function(c){var i=c.fabric||(c.fabric={});if(i.Color){i.warn("fabric.Color is already defined.");return}function h(a){a?this._tryParsingColor(a):this.setSource([0,0,0,1])}i.Color=h,i.Color.prototype={_tryParsingColor:function(a){var o;a in h.colorNameMap&&(a=h.colorNameMap[a]),a==="transparent"&&(o=[255,255,255,0]),o||(o=h.sourceFromHex(a)),o||(o=h.sourceFromRgb(a)),o||(o=h.sourceFromHsl(a)),o||(o=[0,0,0,1]),o&&this.setSource(o)},_rgbToHsl:function(a,o,s){a/=255,o/=255,s/=255;var u,g,f,p=i.util.array.max([a,o,s]),v=i.util.array.min([a,o,s]);if(f=(p+v)/2,p===v)u=g=0;else{var C=p-v;switch(g=f>.5?C/(2-p-v):C/(p+v),p){case a:u=(o-s)/C+(o1&&(s-=1),s<1/6?a+(o-a)*6*s:s<1/2?o:s<2/3?a+(o-a)*(2/3-s)*6:a}i.Color.fromRgb=function(a){return h.fromSource(h.sourceFromRgb(a))},i.Color.sourceFromRgb=function(a){var o=a.match(h.reRGBa);if(o){var s=parseInt(o[1],10)/(/%$/.test(o[1])?100:1)*(/%$/.test(o[1])?255:1),u=parseInt(o[2],10)/(/%$/.test(o[2])?100:1)*(/%$/.test(o[2])?255:1),g=parseInt(o[3],10)/(/%$/.test(o[3])?100:1)*(/%$/.test(o[3])?255:1);return[parseInt(s,10),parseInt(u,10),parseInt(g,10),o[4]?parseFloat(o[4]):1]}},i.Color.fromRgba=h.fromRgb,i.Color.fromHsl=function(a){return h.fromSource(h.sourceFromHsl(a))},i.Color.sourceFromHsl=function(a){var o=a.match(h.reHSLa);if(o){var s=(parseFloat(o[1])%360+360)%360/360,u=parseFloat(o[2])/(/%$/.test(o[2])?100:1),g=parseFloat(o[3])/(/%$/.test(o[3])?100:1),f,p,v;if(u===0)f=p=v=g;else{var C=g<=.5?g*(u+1):g+u-g*u,y=g*2-C;f=d(y,C,s+1/3),p=d(y,C,s),v=d(y,C,s-1/3)}return[Math.round(f*255),Math.round(p*255),Math.round(v*255),o[4]?parseFloat(o[4]):1]}},i.Color.fromHsla=h.fromHsl,i.Color.fromHex=function(a){return h.fromSource(h.sourceFromHex(a))},i.Color.sourceFromHex=function(a){if(a.match(h.reHex)){var o=a.slice(a.indexOf("#")+1),s=o.length===3||o.length===4,u=o.length===8||o.length===4,g=s?o.charAt(0)+o.charAt(0):o.substring(0,2),f=s?o.charAt(1)+o.charAt(1):o.substring(2,4),p=s?o.charAt(2)+o.charAt(2):o.substring(4,6),v=u?s?o.charAt(3)+o.charAt(3):o.substring(6,8):"FF";return[parseInt(g,16),parseInt(f,16),parseInt(p,16),parseFloat((parseInt(v,16)/255).toFixed(2))]}},i.Color.fromSource=function(a){var o=new h;return o.setSource(a),o}}(e),function(c){var i=c.fabric||(c.fabric={}),h=["e","se","s","sw","w","nw","n","ne","e"],d=["ns","nesw","ew","nwse"],a={},o="left",s="top",u="right",g="bottom",f="center",p={top:g,bottom:s,left:u,right:o,center:f},v=i.util.radiansToDegrees,C=Math.sign||function(G){return(G>0)-(G<0)||+G};function y(G,P){var Y=G.angle+v(Math.atan2(P.y,P.x))+360;return Math.round(Y%360/45)}function E(G,P){var Y=P.transform.target,W=Y.canvas,j=i.util.object.clone(P);j.target=Y,W&&W.fire("object:"+G,j),Y.fire(G,P)}function w(G,P){var Y=P.canvas,W=Y.uniScaleKey,j=G[W];return Y.uniformScaling&&!j||!Y.uniformScaling&&j}function I(G){return G.originX===f&&G.originY===f}function S(G,P,Y){var W=G.lockScalingX,j=G.lockScalingY;return!!(W&&j||!P&&(W||j)&&Y||W&&P==="x"||j&&P==="y")}function D(G,P,Y){var W="not-allowed",j=w(G,Y),V="";if(P.x!==0&&P.y===0?V="x":P.x===0&&P.y!==0&&(V="y"),S(Y,V,j))return W;var se=y(Y,P);return h[se]+"-resize"}function R(G,P,Y){var W="not-allowed";if(P.x!==0&&Y.lockSkewingY||P.y!==0&&Y.lockSkewingX)return W;var j=y(Y,P)%4;return d[j]+"-resize"}function J(G,P,Y){return G[Y.canvas.altActionKey]?a.skewCursorStyleHandler(G,P,Y):a.scaleCursorStyleHandler(G,P,Y)}function ee(G,P,Y){var W=G[Y.canvas.altActionKey];if(P.x===0)return W?"skewX":"scaleY";if(P.y===0)return W?"skewY":"scaleX"}function Z(G,P,Y){return Y.lockRotation?"not-allowed":P.cursorStyle}function te(G,P,Y,W){return{e:G,transform:P,pointer:{x:Y,y:W}}}function re(G){return function(P,Y,W,j){var V=Y.target,se=V.getCenterPoint(),ge=V.translateToOriginPoint(se,Y.originX,Y.originY),he=G(P,Y,W,j);return V.setPositionByOrigin(ge,Y.originX,Y.originY),he}}function oe(G,P){return function(Y,W,j,V){var se=P(Y,W,j,V);return se&&E(G,te(Y,W,j,V)),se}}function H(G,P,Y,W,j){var V=G.target,se=V.controls[G.corner],ge=V.canvas.getZoom(),he=V.padding/ge,z=V.toLocalPoint(new i.Point(W,j),P,Y);return z.x>=he&&(z.x-=he),z.x<=-he&&(z.x+=he),z.y>=he&&(z.y-=he),z.y<=he&&(z.y+=he),z.x-=se.offsetX,z.y-=se.offsetY,z}function L(G){return G.flipX!==G.flipY}function B(G,P,Y,W,j){if(G[P]!==0){var V=G._getTransformedDimensions()[W],se=j/V*G[Y];G.set(Y,se)}}function b(G,P,Y,W){var j=P.target,V=j._getTransformedDimensions(0,j.skewY),se=H(P,P.originX,P.originY,Y,W),ge=Math.abs(se.x*2)-V.x,he=j.skewX,z;ge<2?z=0:(z=v(Math.atan2(ge/j.scaleX,V.y/j.scaleY)),P.originX===o&&P.originY===g&&(z=-z),P.originX===u&&P.originY===s&&(z=-z),L(j)&&(z=-z));var fe=he!==z;if(fe){var ve=j._getTransformedDimensions().y;j.set("skewX",z),B(j,"skewY","scaleY","y",ve)}return fe}function Q(G,P,Y,W){var j=P.target,V=j._getTransformedDimensions(j.skewX,0),se=H(P,P.originX,P.originY,Y,W),ge=Math.abs(se.y*2)-V.y,he=j.skewY,z;ge<2?z=0:(z=v(Math.atan2(ge/j.scaleY,V.x/j.scaleX)),P.originX===o&&P.originY===g&&(z=-z),P.originX===u&&P.originY===s&&(z=-z),L(j)&&(z=-z));var fe=he!==z;if(fe){var ve=j._getTransformedDimensions().x;j.set("skewY",z),B(j,"skewX","scaleX","x",ve)}return fe}function T(G,P,Y,W){var j=P.target,V=j.skewX,se,ge=P.originY;if(j.lockSkewingX)return!1;if(V===0){var he=H(P,f,f,Y,W);he.x>0?se=o:se=u}else V>0&&(se=ge===s?o:u),V<0&&(se=ge===s?u:o),L(j)&&(se=se===o?u:o);P.originX=se;var z=oe("skewing",re(b));return z(G,P,Y,W)}function M(G,P,Y,W){var j=P.target,V=j.skewY,se,ge=P.originX;if(j.lockSkewingY)return!1;if(V===0){var he=H(P,f,f,Y,W);he.y>0?se=s:se=g}else V>0&&(se=ge===o?s:g),V<0&&(se=ge===o?g:s),L(j)&&(se=se===s?g:s);P.originY=se;var z=oe("skewing",re(Q));return z(G,P,Y,W)}function _(G,P,Y,W){var j=P,V=j.target,se=V.translateToOriginPoint(V.getCenterPoint(),j.originX,j.originY);if(V.lockRotation)return!1;var ge=Math.atan2(j.ey-se.y,j.ex-se.x),he=Math.atan2(W-se.y,Y-se.x),z=v(he-ge+j.theta),fe=!0;if(V.snapAngle>0){var ve=V.snapAngle,Ee=V.snapThreshold||ve,Oe=Math.ceil(z/ve)*ve,Ie=Math.floor(z/ve)*ve;Math.abs(z-Ie)C?(D=v,s.scale(1,C/v),S=g*v/C):C>v?(D=C,s.scale(v/C,1),I=u*C/v):D=v,s.lineWidth=1,s.beginPath(),s.arc(I,S,D/2,0,2*Math.PI,!1),s[E](),w&&s.stroke(),s.restore()}function o(s,u,g,f,p){f=f||{};var v=this.sizeX||f.cornerSize||p.cornerSize,C=this.sizeY||f.cornerSize||p.cornerSize,y=typeof f.transparentCorners<"u"?f.transparentCorners:p.transparentCorners,E=y?"stroke":"fill",w=!y&&(f.cornerStrokeColor||p.cornerStrokeColor),I=v/2,S=C/2;s.save(),s.fillStyle=f.cornerColor||p.cornerColor,s.strokeStyle=f.cornerStrokeColor||p.cornerStrokeColor,s.lineWidth=1,s.translate(u,g),s.rotate(h(p.angle)),s[E+"Rect"](-I,-S,v,C),w&&s.strokeRect(-I,-S,v,C),s.restore()}d.renderCircleControl=a,d.renderSquareControl=o}(e),function(c){var i=c.fabric||(c.fabric={});function h(d){for(var a in d)this[a]=d[a]}i.Control=h,i.Control.prototype={visible:!0,actionName:"scale",angle:0,x:0,y:0,offsetX:0,offsetY:0,sizeX:null,sizeY:null,touchSizeX:null,touchSizeY:null,cursorStyle:"crosshair",withConnection:!1,actionHandler:function(){},mouseDownHandler:function(){},mouseUpHandler:function(){},getActionHandler:function(){return this.actionHandler},getMouseDownHandler:function(){return this.mouseDownHandler},getMouseUpHandler:function(){return this.mouseUpHandler},cursorStyleHandler:function(d,a){return a.cursorStyle},getActionName:function(d,a){return a.actionName},getVisibility:function(d,a){var o=d._controlsVisibility;return o&&typeof o[a]<"u"?o[a]:this.visible},setVisibility:function(d){this.visible=d},positionHandler:function(d,a){var o=i.util.transformPoint({x:this.x*d.x+this.offsetX,y:this.y*d.y+this.offsetY},a);return o},calcCornerCoords:function(d,a,o,s,u){var g,f,p,v,C=u?this.touchSizeX:this.sizeX,y=u?this.touchSizeY:this.sizeY;if(C&&y&&C!==y){var E=Math.atan2(y,C),w=Math.sqrt(C*C+y*y)/2,I=E-i.util.degreesToRadians(d),S=Math.PI/2-E-i.util.degreesToRadians(d);g=w*i.util.cos(I),f=w*i.util.sin(I),p=w*i.util.cos(S),v=w*i.util.sin(S)}else{var D=C&&y?C:a;w=D*.7071067812;var I=i.util.degreesToRadians(45-d);g=p=w*i.util.cos(I),f=v=w*i.util.sin(I)}return{tl:{x:o-v,y:s-p},tr:{x:o+g,y:s-f},bl:{x:o-g,y:s+f},br:{x:o+v,y:s+p}}},render:function(d,a,o,s,u){switch(s=s||{},s.cornerStyle||u.cornerStyle){case"circle":i.controlsUtils.renderCircleControl.call(this,d,a,o,s,u);break;default:i.controlsUtils.renderSquareControl.call(this,d,a,o,s,u)}}}}(e),function(){function c(o,s){var u=o.getAttribute("style"),g=o.getAttribute("offset")||0,f,p,v,C;if(g=parseFloat(g)/(/%$/.test(g)?100:1),g=g<0?0:g>1?1:g,u){var y=u.split(/\s*;\s*/);for(y[y.length-1]===""&&y.pop(),C=y.length;C--;){var E=y[C].split(/\s*:\s*/),w=E[0].trim(),I=E[1].trim();w==="stop-color"?f=I:w==="stop-opacity"&&(v=I)}}return f||(f=o.getAttribute("stop-color")||"rgb(0,0,0)"),v||(v=o.getAttribute("stop-opacity")),f=new t.Color(f),p=f.getAlpha(),v=isNaN(parseFloat(v))?1:parseFloat(v),v*=p*s,{offset:g,color:f.toRgb(),opacity:v}}function i(o){return{x1:o.getAttribute("x1")||0,y1:o.getAttribute("y1")||0,x2:o.getAttribute("x2")||"100%",y2:o.getAttribute("y2")||0}}function h(o){return{x1:o.getAttribute("fx")||o.getAttribute("cx")||"50%",y1:o.getAttribute("fy")||o.getAttribute("cy")||"50%",r1:0,x2:o.getAttribute("cx")||"50%",y2:o.getAttribute("cy")||"50%",r2:o.getAttribute("r")||"50%"}}var d=t.util.object.clone;t.Gradient=t.util.createClass({offsetX:0,offsetY:0,gradientTransform:null,gradientUnits:"pixels",type:"linear",initialize:function(o){o||(o={}),o.coords||(o.coords={});var s,u=this;Object.keys(o).forEach(function(g){u[g]=o[g]}),this.id?this.id+="_"+t.Object.__uid++:this.id=t.Object.__uid++,s={x1:o.coords.x1||0,y1:o.coords.y1||0,x2:o.coords.x2||0,y2:o.coords.y2||0},this.type==="radial"&&(s.r1=o.coords.r1||0,s.r2=o.coords.r2||0),this.coords=s,this.colorStops=o.colorStops.slice()},addColorStop:function(o){for(var s in o){var u=new t.Color(o[s]);this.colorStops.push({offset:parseFloat(s),color:u.toRgb(),opacity:u.getAlpha()})}return this},toObject:function(o){var s={type:this.type,coords:this.coords,colorStops:this.colorStops,offsetX:this.offsetX,offsetY:this.offsetY,gradientUnits:this.gradientUnits,gradientTransform:this.gradientTransform?this.gradientTransform.concat():this.gradientTransform};return t.util.populateWithProperties(this,s,o),s},toSVG:function(o,p){var u=d(this.coords,!0),g,f,p=p||{},v,C,y=d(this.colorStops,!0),E=u.r1>u.r2,w=this.gradientTransform?this.gradientTransform.concat():t.iMatrix.concat(),I=-this.offsetX,S=-this.offsetY,D=!!p.additionalTransform,R=this.gradientUnits==="pixels"?"userSpaceOnUse":"objectBoundingBox";if(y.sort(function(re,oe){return re.offset-oe.offset}),R==="objectBoundingBox"?(I/=o.width,S/=o.height):(I+=o.width/2,S+=o.height/2),o.type==="path"&&this.gradientUnits!=="percentage"&&(I-=o.pathOffset.x,S-=o.pathOffset.y),w[4]-=I,w[5]-=S,C='id="SVGID_'+this.id+'" gradientUnits="'+R+'"',C+=' gradientTransform="'+(D?p.additionalTransform+" ":"")+t.util.matrixToSVG(w)+'" ',this.type==="linear"?v=[" `]:this.type==="radial"&&(v=[" `]),this.type==="radial"){if(E)for(y=y.concat(),y.reverse(),g=0,f=y.length;g0){var ee=Math.max(u.r1,u.r2),Z=J/ee;for(g=0,f=y.length;g `)}return v.push(this.type==="linear"?` `:` -`),v.join("")},toLive:function(o){var s,u=t.util.object.clone(this.coords),g,f;if(this.type){for(this.type==="linear"?s=o.createLinearGradient(u.x1,u.y1,u.x2,u.y2):this.type==="radial"&&(s=o.createRadialGradient(u.x1,u.y1,u.r1,u.x2,u.y2,u.r2)),g=0,f=this.colorStops.length;g1?1:f,isNaN(f)&&(f=1);var p=o.getElementsByTagName("stop"),v,C=o.getAttribute("gradientUnits")==="userSpaceOnUse"?"pixels":"percentage",y=o.getAttribute("gradientTransform")||"",E=[],w,I,S=0,D=0,R;for(o.nodeName==="linearGradient"||o.nodeName==="LINEARGRADIENT"?(v="linear",w=i(o)):(v="radial",w=h(o)),I=p.length;I--;)E.push(c(p[I],f));R=t.parseTransformAttribute(y),a(s,w,g,C),C==="pixels"&&(S=-s.left,D=-s.top);var J=new t.Gradient({id:o.getAttribute("id"),type:v,coords:w,colorStops:E,gradientUnits:C,gradientTransform:R,offsetX:S,offsetY:D});return J}});function a(o,s,u,g){var f,p;Object.keys(s).forEach(function(v){f=s[v],f==="Infinity"?p=1:f==="-Infinity"?p=0:(p=parseFloat(s[v],10),typeof f=="string"&&/^(\d+\.\d+)%|(\d+)%$/.test(f)&&(p*=.01,g==="pixels"&&((v==="x1"||v==="x2"||v==="r2")&&(p*=u.viewBoxWidth||u.width),(v==="y1"||v==="y2")&&(p*=u.viewBoxHeight||u.height)))),s[v]=p})}}(),function(){var c=t.util.toFixed;t.Pattern=t.util.createClass({repeat:"repeat",offsetX:0,offsetY:0,crossOrigin:"",patternTransform:null,initialize:function(i,h){if(i||(i={}),this.id=t.Object.__uid++,this.setOptions(i),!i.source||i.source&&typeof i.source!="string"){h&&h(this);return}else{var A=this;this.source=t.util.createImage(),t.util.loadImage(i.source,function(a,o){A.source=a,h&&h(A,o)},null,this.crossOrigin)}},toObject:function(i){var h=t.Object.NUM_FRACTION_DIGITS,A,a;return typeof this.source.src=="string"?A=this.source.src:typeof this.source=="object"&&this.source.toDataURL&&(A=this.source.toDataURL()),a={type:"pattern",source:A,repeat:this.repeat,crossOrigin:this.crossOrigin,offsetX:c(this.offsetX,h),offsetY:c(this.offsetY,h),patternTransform:this.patternTransform?this.patternTransform.concat():null},t.util.populateWithProperties(this,a,i),a},toSVG:function(i){var h=typeof this.source=="function"?this.source():this.source,A=h.width/i.width,a=h.height/i.height,o=this.offsetX/i.width,s=this.offsetY/i.height,u="";return(this.repeat==="repeat-x"||this.repeat==="no-repeat")&&(a=1,s&&(a+=Math.abs(s))),(this.repeat==="repeat-y"||this.repeat==="no-repeat")&&(A=1,o&&(A+=Math.abs(o))),h.src?u=h.src:h.toDataURL&&(u=h.toDataURL()),' +`),v.join("")},toLive:function(o){var s,u=t.util.object.clone(this.coords),g,f;if(this.type){for(this.type==="linear"?s=o.createLinearGradient(u.x1,u.y1,u.x2,u.y2):this.type==="radial"&&(s=o.createRadialGradient(u.x1,u.y1,u.r1,u.x2,u.y2,u.r2)),g=0,f=this.colorStops.length;g1?1:f,isNaN(f)&&(f=1);var p=o.getElementsByTagName("stop"),v,C=o.getAttribute("gradientUnits")==="userSpaceOnUse"?"pixels":"percentage",y=o.getAttribute("gradientTransform")||"",E=[],w,I,S=0,D=0,R;for(o.nodeName==="linearGradient"||o.nodeName==="LINEARGRADIENT"?(v="linear",w=i(o)):(v="radial",w=h(o)),I=p.length;I--;)E.push(c(p[I],f));R=t.parseTransformAttribute(y),a(s,w,g,C),C==="pixels"&&(S=-s.left,D=-s.top);var J=new t.Gradient({id:o.getAttribute("id"),type:v,coords:w,colorStops:E,gradientUnits:C,gradientTransform:R,offsetX:S,offsetY:D});return J}});function a(o,s,u,g){var f,p;Object.keys(s).forEach(function(v){f=s[v],f==="Infinity"?p=1:f==="-Infinity"?p=0:(p=parseFloat(s[v],10),typeof f=="string"&&/^(\d+\.\d+)%|(\d+)%$/.test(f)&&(p*=.01,g==="pixels"&&((v==="x1"||v==="x2"||v==="r2")&&(p*=u.viewBoxWidth||u.width),(v==="y1"||v==="y2")&&(p*=u.viewBoxHeight||u.height)))),s[v]=p})}}(),function(){var c=t.util.toFixed;t.Pattern=t.util.createClass({repeat:"repeat",offsetX:0,offsetY:0,crossOrigin:"",patternTransform:null,initialize:function(i,h){if(i||(i={}),this.id=t.Object.__uid++,this.setOptions(i),!i.source||i.source&&typeof i.source!="string"){h&&h(this);return}else{var d=this;this.source=t.util.createImage(),t.util.loadImage(i.source,function(a,o){d.source=a,h&&h(d,o)},null,this.crossOrigin)}},toObject:function(i){var h=t.Object.NUM_FRACTION_DIGITS,d,a;return typeof this.source.src=="string"?d=this.source.src:typeof this.source=="object"&&this.source.toDataURL&&(d=this.source.toDataURL()),a={type:"pattern",source:d,repeat:this.repeat,crossOrigin:this.crossOrigin,offsetX:c(this.offsetX,h),offsetY:c(this.offsetY,h),patternTransform:this.patternTransform?this.patternTransform.concat():null},t.util.populateWithProperties(this,a,i),a},toSVG:function(i){var h=typeof this.source=="function"?this.source():this.source,d=h.width/i.width,a=h.height/i.height,o=this.offsetX/i.width,s=this.offsetY/i.height,u="";return(this.repeat==="repeat-x"||this.repeat==="no-repeat")&&(a=1,s&&(a+=Math.abs(s))),(this.repeat==="repeat-y"||this.repeat==="no-repeat")&&(d=1,o&&(d+=Math.abs(o))),h.src?u=h.src:h.toDataURL&&(u=h.toDataURL()),' -`},setOptions:function(i){for(var h in i)this[h]=i[h]},toLive:function(i){var h=this.source;return!h||typeof h.src<"u"&&(!h.complete||h.naturalWidth===0||h.naturalHeight===0)?"":i.createPattern(h,this.repeat)}})}(),function(c){var i=c.fabric||(c.fabric={}),h=i.util.toFixed;if(i.Shadow){i.warn("fabric.Shadow is already defined.");return}i.Shadow=i.util.createClass({color:"rgb(0,0,0)",blur:0,offsetX:0,offsetY:0,affectStroke:!1,includeDefaultValues:!0,nonScaling:!1,initialize:function(A){typeof A=="string"&&(A=this._parseShadow(A));for(var a in A)this[a]=A[a];this.id=i.Object.__uid++},_parseShadow:function(A){var a=A.trim(),o=i.Shadow.reOffsetsAndBlur.exec(a)||[],s=a.replace(i.Shadow.reOffsetsAndBlur,"")||"rgb(0,0,0)";return{color:s.trim(),offsetX:parseFloat(o[1],10)||0,offsetY:parseFloat(o[2],10)||0,blur:parseFloat(o[3],10)||0}},toString:function(){return[this.offsetX,this.offsetY,this.blur,this.color].join("px ")},toSVG:function(A){var a=40,o=40,s=i.Object.NUM_FRACTION_DIGITS,u=i.util.rotateVector({x:this.offsetX,y:this.offsetY},i.util.degreesToRadians(-A.angle)),g=20,f=new i.Color(this.color);return A.width&&A.height&&(a=h((Math.abs(u.x)+this.blur)/A.width,s)*100+g,o=h((Math.abs(u.y)+this.blur)/A.height,s)*100+g),A.flipX&&(u.x*=-1),A.flipY&&(u.y*=-1),' +`},setOptions:function(i){for(var h in i)this[h]=i[h]},toLive:function(i){var h=this.source;return!h||typeof h.src<"u"&&(!h.complete||h.naturalWidth===0||h.naturalHeight===0)?"":i.createPattern(h,this.repeat)}})}(),function(c){var i=c.fabric||(c.fabric={}),h=i.util.toFixed;if(i.Shadow){i.warn("fabric.Shadow is already defined.");return}i.Shadow=i.util.createClass({color:"rgb(0,0,0)",blur:0,offsetX:0,offsetY:0,affectStroke:!1,includeDefaultValues:!0,nonScaling:!1,initialize:function(d){typeof d=="string"&&(d=this._parseShadow(d));for(var a in d)this[a]=d[a];this.id=i.Object.__uid++},_parseShadow:function(d){var a=d.trim(),o=i.Shadow.reOffsetsAndBlur.exec(a)||[],s=a.replace(i.Shadow.reOffsetsAndBlur,"")||"rgb(0,0,0)";return{color:s.trim(),offsetX:parseFloat(o[1],10)||0,offsetY:parseFloat(o[2],10)||0,blur:parseFloat(o[3],10)||0}},toString:function(){return[this.offsetX,this.offsetY,this.blur,this.color].join("px ")},toSVG:function(d){var a=40,o=40,s=i.Object.NUM_FRACTION_DIGITS,u=i.util.rotateVector({x:this.offsetX,y:this.offsetY},i.util.degreesToRadians(-d.angle)),g=20,f=new i.Color(this.color);return d.width&&d.height&&(a=h((Math.abs(u.x)+this.blur)/d.width,s)*100+g,o=h((Math.abs(u.y)+this.blur)/d.height,s)*100+g),d.flipX&&(u.x*=-1),d.flipY&&(u.y*=-1),' @@ -57,11 +57,11 @@ Error generating stack: `+d.message+` -`},toObject:function(){if(this.includeDefaultValues)return{color:this.color,blur:this.blur,offsetX:this.offsetX,offsetY:this.offsetY,affectStroke:this.affectStroke,nonScaling:this.nonScaling};var A={},a=i.Shadow.prototype;return["color","blur","offsetX","offsetY","affectStroke","nonScaling"].forEach(function(o){this[o]!==a[o]&&(A[o]=this[o])},this),A}}),i.Shadow.reOffsetsAndBlur=/(?:\s|^)(-?\d+(?:\.\d*)?(?:px)?(?:\s?|$))?(-?\d+(?:\.\d*)?(?:px)?(?:\s?|$))?(\d+(?:\.\d*)?(?:px)?)?(?:\s?|$)(?:$|\s)/}(e),function(){if(t.StaticCanvas){t.warn("fabric.StaticCanvas is already defined.");return}var c=t.util.object.extend,i=t.util.getElementOffset,h=t.util.removeFromArray,A=t.util.toFixed,a=t.util.transformPoint,o=t.util.invertTransform,s=t.util.getNodeCanvas,u=t.util.createCanvasElement,g=new Error("Could not initialize `canvas` element");t.StaticCanvas=t.util.createClass(t.CommonMethods,{initialize:function(f,p){p||(p={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(f,p)},backgroundColor:"",backgroundImage:null,overlayColor:"",overlayImage:null,includeDefaultValues:!0,stateful:!1,renderOnAddRemove:!0,controlsAboveOverlay:!1,allowTouchScrolling:!1,imageSmoothingEnabled:!0,viewportTransform:t.iMatrix.concat(),backgroundVpt:!0,overlayVpt:!0,enableRetinaScaling:!0,vptCoords:{},skipOffscreen:!0,clipPath:void 0,_initStatic:function(f,p){var v=this.requestRenderAllBound;this._objects=[],this._createLowerCanvas(f),this._initOptions(p),this.interactive||this._initRetinaScaling(),p.overlayImage&&this.setOverlayImage(p.overlayImage,v),p.backgroundImage&&this.setBackgroundImage(p.backgroundImage,v),p.backgroundColor&&this.setBackgroundColor(p.backgroundColor,v),p.overlayColor&&this.setOverlayColor(p.overlayColor,v),this.calcOffset()},_isRetinaScaling:function(){return t.devicePixelRatio>1&&this.enableRetinaScaling},getRetinaScaling:function(){return this._isRetinaScaling()?Math.max(1,t.devicePixelRatio):1},_initRetinaScaling:function(){if(this._isRetinaScaling()){var f=t.devicePixelRatio;this.__initRetinaScaling(f,this.lowerCanvasEl,this.contextContainer),this.upperCanvasEl&&this.__initRetinaScaling(f,this.upperCanvasEl,this.contextTop)}},__initRetinaScaling:function(f,p,v){p.setAttribute("width",this.width*f),p.setAttribute("height",this.height*f),v.scale(f,f)},calcOffset:function(){return this._offset=i(this.lowerCanvasEl),this},setOverlayImage:function(f,p,v){return this.__setBgOverlayImage("overlayImage",f,p,v)},setBackgroundImage:function(f,p,v){return this.__setBgOverlayImage("backgroundImage",f,p,v)},setOverlayColor:function(f,p){return this.__setBgOverlayColor("overlayColor",f,p)},setBackgroundColor:function(f,p){return this.__setBgOverlayColor("backgroundColor",f,p)},__setBgOverlayImage:function(f,p,v,C){return typeof p=="string"?t.util.loadImage(p,function(y,E){if(y){var w=new t.Image(y,C);this[f]=w,w.canvas=this}v&&v(y,E)},this,C&&C.crossOrigin):(C&&p.setOptions(C),this[f]=p,p&&(p.canvas=this),v&&v(p,!1)),this},__setBgOverlayColor:function(f,p,v){return this[f]=p,this._initGradient(p,f),this._initPattern(p,f,v),this},_createCanvasElement:function(){var f=u();if(!f||(f.style||(f.style={}),typeof f.getContext>"u"))throw g;return f},_initOptions:function(f){var p=this.lowerCanvasEl;this._setOptions(f),this.width=this.width||parseInt(p.width,10)||0,this.height=this.height||parseInt(p.height,10)||0,this.lowerCanvasEl.style&&(p.width=this.width,p.height=this.height,p.style.width=this.width+"px",p.style.height=this.height+"px",this.viewportTransform=this.viewportTransform.slice())},_createLowerCanvas:function(f){f&&f.getContext?this.lowerCanvasEl=f:this.lowerCanvasEl=t.util.getById(f)||this._createCanvasElement(),t.util.addClass(this.lowerCanvasEl,"lower-canvas"),this._originalCanvasStyle=this.lowerCanvasEl.style,this.interactive&&this._applyCanvasStyle(this.lowerCanvasEl),this.contextContainer=this.lowerCanvasEl.getContext("2d")},getWidth:function(){return this.width},getHeight:function(){return this.height},setWidth:function(f,p){return this.setDimensions({width:f},p)},setHeight:function(f,p){return this.setDimensions({height:f},p)},setDimensions:function(f,p){var v;p=p||{};for(var C in f)v=f[C],p.cssOnly||(this._setBackstoreDimension(C,f[C]),v+="px",this.hasLostContext=!0),p.backstoreOnly||this._setCssDimension(C,v);return this._isCurrentlyDrawing&&this.freeDrawingBrush&&this.freeDrawingBrush._setBrushStyles(this.contextTop),this._initRetinaScaling(),this.calcOffset(),p.cssOnly||this.requestRenderAll(),this},_setBackstoreDimension:function(f,p){return this.lowerCanvasEl[f]=p,this.upperCanvasEl&&(this.upperCanvasEl[f]=p),this.cacheCanvasEl&&(this.cacheCanvasEl[f]=p),this[f]=p,this},_setCssDimension:function(f,p){return this.lowerCanvasEl.style[f]=p,this.upperCanvasEl&&(this.upperCanvasEl.style[f]=p),this.wrapperEl&&(this.wrapperEl.style[f]=p),this},getZoom:function(){return this.viewportTransform[0]},setViewportTransform:function(f){var p=this._activeObject,v=this.backgroundImage,C=this.overlayImage,y,E,w;for(this.viewportTransform=f,E=0,w=this._objects.length;E +`},toObject:function(){if(this.includeDefaultValues)return{color:this.color,blur:this.blur,offsetX:this.offsetX,offsetY:this.offsetY,affectStroke:this.affectStroke,nonScaling:this.nonScaling};var d={},a=i.Shadow.prototype;return["color","blur","offsetX","offsetY","affectStroke","nonScaling"].forEach(function(o){this[o]!==a[o]&&(d[o]=this[o])},this),d}}),i.Shadow.reOffsetsAndBlur=/(?:\s|^)(-?\d+(?:\.\d*)?(?:px)?(?:\s?|$))?(-?\d+(?:\.\d*)?(?:px)?(?:\s?|$))?(\d+(?:\.\d*)?(?:px)?)?(?:\s?|$)(?:$|\s)/}(e),function(){if(t.StaticCanvas){t.warn("fabric.StaticCanvas is already defined.");return}var c=t.util.object.extend,i=t.util.getElementOffset,h=t.util.removeFromArray,d=t.util.toFixed,a=t.util.transformPoint,o=t.util.invertTransform,s=t.util.getNodeCanvas,u=t.util.createCanvasElement,g=new Error("Could not initialize `canvas` element");t.StaticCanvas=t.util.createClass(t.CommonMethods,{initialize:function(f,p){p||(p={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(f,p)},backgroundColor:"",backgroundImage:null,overlayColor:"",overlayImage:null,includeDefaultValues:!0,stateful:!1,renderOnAddRemove:!0,controlsAboveOverlay:!1,allowTouchScrolling:!1,imageSmoothingEnabled:!0,viewportTransform:t.iMatrix.concat(),backgroundVpt:!0,overlayVpt:!0,enableRetinaScaling:!0,vptCoords:{},skipOffscreen:!0,clipPath:void 0,_initStatic:function(f,p){var v=this.requestRenderAllBound;this._objects=[],this._createLowerCanvas(f),this._initOptions(p),this.interactive||this._initRetinaScaling(),p.overlayImage&&this.setOverlayImage(p.overlayImage,v),p.backgroundImage&&this.setBackgroundImage(p.backgroundImage,v),p.backgroundColor&&this.setBackgroundColor(p.backgroundColor,v),p.overlayColor&&this.setOverlayColor(p.overlayColor,v),this.calcOffset()},_isRetinaScaling:function(){return t.devicePixelRatio>1&&this.enableRetinaScaling},getRetinaScaling:function(){return this._isRetinaScaling()?Math.max(1,t.devicePixelRatio):1},_initRetinaScaling:function(){if(this._isRetinaScaling()){var f=t.devicePixelRatio;this.__initRetinaScaling(f,this.lowerCanvasEl,this.contextContainer),this.upperCanvasEl&&this.__initRetinaScaling(f,this.upperCanvasEl,this.contextTop)}},__initRetinaScaling:function(f,p,v){p.setAttribute("width",this.width*f),p.setAttribute("height",this.height*f),v.scale(f,f)},calcOffset:function(){return this._offset=i(this.lowerCanvasEl),this},setOverlayImage:function(f,p,v){return this.__setBgOverlayImage("overlayImage",f,p,v)},setBackgroundImage:function(f,p,v){return this.__setBgOverlayImage("backgroundImage",f,p,v)},setOverlayColor:function(f,p){return this.__setBgOverlayColor("overlayColor",f,p)},setBackgroundColor:function(f,p){return this.__setBgOverlayColor("backgroundColor",f,p)},__setBgOverlayImage:function(f,p,v,C){return typeof p=="string"?t.util.loadImage(p,function(y,E){if(y){var w=new t.Image(y,C);this[f]=w,w.canvas=this}v&&v(y,E)},this,C&&C.crossOrigin):(C&&p.setOptions(C),this[f]=p,p&&(p.canvas=this),v&&v(p,!1)),this},__setBgOverlayColor:function(f,p,v){return this[f]=p,this._initGradient(p,f),this._initPattern(p,f,v),this},_createCanvasElement:function(){var f=u();if(!f||(f.style||(f.style={}),typeof f.getContext>"u"))throw g;return f},_initOptions:function(f){var p=this.lowerCanvasEl;this._setOptions(f),this.width=this.width||parseInt(p.width,10)||0,this.height=this.height||parseInt(p.height,10)||0,this.lowerCanvasEl.style&&(p.width=this.width,p.height=this.height,p.style.width=this.width+"px",p.style.height=this.height+"px",this.viewportTransform=this.viewportTransform.slice())},_createLowerCanvas:function(f){f&&f.getContext?this.lowerCanvasEl=f:this.lowerCanvasEl=t.util.getById(f)||this._createCanvasElement(),t.util.addClass(this.lowerCanvasEl,"lower-canvas"),this._originalCanvasStyle=this.lowerCanvasEl.style,this.interactive&&this._applyCanvasStyle(this.lowerCanvasEl),this.contextContainer=this.lowerCanvasEl.getContext("2d")},getWidth:function(){return this.width},getHeight:function(){return this.height},setWidth:function(f,p){return this.setDimensions({width:f},p)},setHeight:function(f,p){return this.setDimensions({height:f},p)},setDimensions:function(f,p){var v;p=p||{};for(var C in f)v=f[C],p.cssOnly||(this._setBackstoreDimension(C,f[C]),v+="px",this.hasLostContext=!0),p.backstoreOnly||this._setCssDimension(C,v);return this._isCurrentlyDrawing&&this.freeDrawingBrush&&this.freeDrawingBrush._setBrushStyles(this.contextTop),this._initRetinaScaling(),this.calcOffset(),p.cssOnly||this.requestRenderAll(),this},_setBackstoreDimension:function(f,p){return this.lowerCanvasEl[f]=p,this.upperCanvasEl&&(this.upperCanvasEl[f]=p),this.cacheCanvasEl&&(this.cacheCanvasEl[f]=p),this[f]=p,this},_setCssDimension:function(f,p){return this.lowerCanvasEl.style[f]=p,this.upperCanvasEl&&(this.upperCanvasEl.style[f]=p),this.wrapperEl&&(this.wrapperEl.style[f]=p),this},getZoom:function(){return this.viewportTransform[0]},setViewportTransform:function(f){var p=this._activeObject,v=this.backgroundImage,C=this.overlayImage,y,E,w;for(this.viewportTransform=f,E=0,w=this._objects.length;E `),this._setSVGBgOverlayColor(v,"background"),this._setSVGBgOverlayImage(v,"backgroundImage",p),this._setSVGObjects(v,p),this.clipPath&&v.push(` `),this._setSVGBgOverlayColor(v,"overlay"),this._setSVGBgOverlayImage(v,"overlayImage",p),v.push(""),v.join("")},_setSVGPreamble:function(f,p){p.suppressPreamble||f.push(' `,' -`)},_setSVGHeader:function(f,p){var v=p.width||this.width,C=p.height||this.height,y,E='viewBox="0 0 '+this.width+" "+this.height+'" ',w=t.Object.NUM_FRACTION_DIGITS;p.viewBox?E='viewBox="'+p.viewBox.x+" "+p.viewBox.y+" "+p.viewBox.width+" "+p.viewBox.height+'" ':this.svgViewportTransformation&&(y=this.viewportTransform,E='viewBox="'+A(-y[4]/y[0],w)+" "+A(-y[5]/y[3],w)+" "+A(this.width/y[0],w)+" "+A(this.height/y[3],w)+'" '),f.push(" +`)},_setSVGHeader:function(f,p){var v=p.width||this.width,C=p.height||this.height,y,E='viewBox="0 0 '+this.width+" "+this.height+'" ',w=t.Object.NUM_FRACTION_DIGITS;p.viewBox?E='viewBox="'+p.viewBox.x+" "+p.viewBox.y+" "+p.viewBox.width+" "+p.viewBox.height+'" ':this.svgViewportTransformation&&(y=this.viewportTransform,E='viewBox="'+d(-y[4]/y[0],w)+" "+d(-y[5]/y[3],w)+" "+d(this.width/y[0],w)+" "+d(this.height/y[3],w)+'" '),f.push(" `,"Created with Fabric.js ",t.version,` `,` `,this.createSVGFontFacesMarkup(),this.createSVGRefElementsMarkup(),this.createSVGClipPathMarkup(p),` @@ -75,29 +75,29 @@ Error generating stack: `+d.message+` `,f,"]]>",` `].join("")),f},_setSVGObjects:function(f,p){var v,C,y,E=this._objects;for(C=0,y=E.length;C `)}else f.push(' -`)},sendToBack:function(f){if(!f)return this;var p=this._activeObject,v,C,y;if(f===p&&f.type==="activeSelection")for(y=p._objects,v=y.length;v--;)C=y[v],h(this._objects,C),this._objects.unshift(C);else h(this._objects,f),this._objects.unshift(f);return this.renderOnAddRemove&&this.requestRenderAll(),this},bringToFront:function(f){if(!f)return this;var p=this._activeObject,v,C,y;if(f===p&&f.type==="activeSelection")for(y=p._objects,v=0;v0+S&&(w=E-1,h(this._objects,y),this._objects.splice(w,0,y)),S++;else E=this._objects.indexOf(f),E!==0&&(w=this._findNewLowerIndex(f,E,p),h(this._objects,f),this._objects.splice(w,0,f));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewLowerIndex:function(f,p,v){var C,y;if(v)for(C=p,y=p-1;y>=0;--y){var E=f.intersectsWithObject(this._objects[y])||f.isContainedWithinObject(this._objects[y])||this._objects[y].isContainedWithinObject(f);if(E){C=y;break}}else C=p-1;return C},bringForward:function(f,p){if(!f)return this;var v=this._activeObject,C,y,E,w,I,S=0;if(f===v&&f.type==="activeSelection")for(I=v._objects,C=I.length;C--;)y=I[C],E=this._objects.indexOf(y),E"}}),c(t.StaticCanvas.prototype,t.Observable),c(t.StaticCanvas.prototype,t.Collection),c(t.StaticCanvas.prototype,t.DataURLExporter),c(t.StaticCanvas,{EMPTY_JSON:'{"objects": [], "background": "white"}',supports:function(f){var p=u();if(!p||!p.getContext)return null;var v=p.getContext("2d");if(!v)return null;switch(f){case"setLineDash":return typeof v.setLineDash<"u";default:return null}}}),t.StaticCanvas.prototype.toJSON=t.StaticCanvas.prototype.toObject,t.isLikelyNode&&(t.StaticCanvas.prototype.createPNGStream=function(){var f=s(this.lowerCanvasEl);return f&&f.createPNGStream()},t.StaticCanvas.prototype.createJPEGStream=function(f){var p=s(this.lowerCanvasEl);return p&&p.createJPEGStream(f)})}(),t.BaseBrush=t.util.createClass({color:"rgb(0, 0, 0)",width:1,shadow:null,strokeLineCap:"round",strokeLineJoin:"round",strokeMiterLimit:10,strokeDashArray:null,limitedToCanvasSize:!1,_setBrushStyles:function(c){c.strokeStyle=this.color,c.lineWidth=this.width,c.lineCap=this.strokeLineCap,c.miterLimit=this.strokeMiterLimit,c.lineJoin=this.strokeLineJoin,c.setLineDash(this.strokeDashArray||[])},_saveAndTransform:function(c){var i=this.canvas.viewportTransform;c.save(),c.transform(i[0],i[1],i[2],i[3],i[4],i[5])},_setShadow:function(){if(this.shadow){var c=this.canvas,i=this.shadow,h=c.contextTop,A=c.getZoom();c&&c._isRetinaScaling()&&(A*=t.devicePixelRatio),h.shadowColor=i.color,h.shadowBlur=i.blur*A,h.shadowOffsetX=i.offsetX*A,h.shadowOffsetY=i.offsetY*A}},needsFullRender:function(){var c=new t.Color(this.color);return c.getAlpha()<1||!!this.shadow},_resetShadow:function(){var c=this.canvas.contextTop;c.shadowColor="",c.shadowBlur=c.shadowOffsetX=c.shadowOffsetY=0},_isOutSideCanvas:function(c){return c.x<0||c.x>this.canvas.getWidth()||c.y<0||c.y>this.canvas.getHeight()}}),function(){t.PencilBrush=t.util.createClass(t.BaseBrush,{decimate:.4,drawStraightLine:!1,straightLineKey:"shiftKey",initialize:function(c){this.canvas=c,this._points=[]},needsFullRender:function(){return this.callSuper("needsFullRender")||this._hasStraightLine},_drawSegment:function(c,i,h){var A=i.midPointFrom(h);return c.quadraticCurveTo(i.x,i.y,A.x,A.y),A},onMouseDown:function(c,i){this.canvas._isMainEvent(i.e)&&(this.drawStraightLine=i.e[this.straightLineKey],this._prepareForDrawing(c),this._captureDrawingPath(c),this._render())},onMouseMove:function(c,i){if(this.canvas._isMainEvent(i.e)&&(this.drawStraightLine=i.e[this.straightLineKey],!(this.limitedToCanvasSize===!0&&this._isOutSideCanvas(c))&&this._captureDrawingPath(c)&&this._points.length>1))if(this.needsFullRender())this.canvas.clearContext(this.canvas.contextTop),this._render();else{var h=this._points,A=h.length,a=this.canvas.contextTop;this._saveAndTransform(a),this.oldEnd&&(a.beginPath(),a.moveTo(this.oldEnd.x,this.oldEnd.y)),this.oldEnd=this._drawSegment(a,h[A-2],h[A-1],!0),a.stroke(),a.restore()}},onMouseUp:function(c){return this.canvas._isMainEvent(c.e)?(this.drawStraightLine=!1,this.oldEnd=void 0,this._finalizeAndAddPath(),!1):!0},_prepareForDrawing:function(c){var i=new t.Point(c.x,c.y);this._reset(),this._addPoint(i),this.canvas.contextTop.moveTo(i.x,i.y)},_addPoint:function(c){return this._points.length>1&&c.eq(this._points[this._points.length-1])?!1:(this.drawStraightLine&&this._points.length>1&&(this._hasStraightLine=!0,this._points.pop()),this._points.push(c),!0)},_reset:function(){this._points=[],this._setBrushStyles(this.canvas.contextTop),this._setShadow(),this._hasStraightLine=!1},_captureDrawingPath:function(c){var i=new t.Point(c.x,c.y);return this._addPoint(i)},_render:function(c){var i,h,A=this._points[0],a=this._points[1];if(c=c||this.canvas.contextTop,this._saveAndTransform(c),c.beginPath(),this._points.length===2&&A.x===a.x&&A.y===a.y){var o=this.width/1e3;A=new t.Point(A.x,A.y),a=new t.Point(a.x,a.y),A.x-=o,a.x+=o}for(c.moveTo(A.x,A.y),i=1,h=this._points.length;i=A&&(s=c[a],u.push(s));return u.push(c[o]),u},_finalizeAndAddPath:function(){var c=this.canvas.contextTop;c.closePath(),this.decimate&&(this._points=this.decimatePoints(this._points,this.decimate));var i=this.convertPointsToSVGPath(this._points);if(this._isEmptySVGPath(i)){this.canvas.requestRenderAll();return}var h=this.createPath(i);this.canvas.clearContext(this.canvas.contextTop),this.canvas.fire("before:path:created",{path:h}),this.canvas.add(h),this.canvas.requestRenderAll(),h.setCoords(),this._resetShadow(),this.canvas.fire("path:created",{path:h})}})}(),t.CircleBrush=t.util.createClass(t.BaseBrush,{width:10,initialize:function(c){this.canvas=c,this.points=[]},drawDot:function(c){var i=this.addPoint(c),h=this.canvas.contextTop;this._saveAndTransform(h),this.dot(h,i),h.restore()},dot:function(c,i){c.fillStyle=i.fill,c.beginPath(),c.arc(i.x,i.y,i.radius,0,Math.PI*2,!1),c.closePath(),c.fill()},onMouseDown:function(c){this.points.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.drawDot(c)},_render:function(){var c=this.canvas.contextTop,i,h,A=this.points;for(this._saveAndTransform(c),i=0,h=A.length;i0&&!this.preserveObjectStacking){s=[],u=[];for(var g=0,f=this._objects.length;g1&&(this._activeObject._objects=u),s.push.apply(s,u)}else s=this._objects;return s},renderAll:function(){this.contextTopDirty&&!this._groupSelector&&!this.isDrawingMode&&(this.clearContext(this.contextTop),this.contextTopDirty=!1),this.hasLostContext&&(this.renderTopLayer(this.contextTop),this.hasLostContext=!1);var a=this.contextContainer;return this.renderCanvas(a,this._chooseObjectsToRender()),this},renderTopLayer:function(a){a.save(),this.isDrawingMode&&this._isCurrentlyDrawing&&(this.freeDrawingBrush&&this.freeDrawingBrush._render(),this.contextTopDirty=!0),this.selection&&this._groupSelector&&(this._drawSelection(a),this.contextTopDirty=!0),a.restore()},renderTop:function(){var a=this.contextTop;return this.clearContext(a),this.renderTopLayer(a),this.fire("after:render"),this},_normalizePointer:function(a,o){var s=a.calcTransformMatrix(),u=t.util.invertTransform(s),g=this.restorePointerVpt(o);return t.util.transformPoint(g,u)},isTargetTransparent:function(a,o,s){if(a.shouldCache()&&a._cacheCanvas&&a!==this._activeObject){var u=this._normalizePointer(a,{x:o,y:s}),g=Math.max(a.cacheTranslationX+u.x*a.zoomX,0),f=Math.max(a.cacheTranslationY+u.y*a.zoomY,0),y=t.util.isTransparent(a._cacheContext,Math.round(g),Math.round(f),this.targetFindTolerance);return y}var p=this.contextCache,v=a.selectionBackgroundColor,C=this.viewportTransform;a.selectionBackgroundColor="",this.clearContext(p),p.save(),p.transform(C[0],C[1],C[2],C[3],C[4],C[5]),a.render(p),p.restore(),a.selectionBackgroundColor=v;var y=t.util.isTransparent(p,o,s,this.targetFindTolerance);return y},_isSelectionKeyPressed:function(a){var o=!1;return Array.isArray(this.selectionKey)?o=!!this.selectionKey.find(function(s){return a[s]===!0}):o=a[this.selectionKey],o},_shouldClearSelection:function(a,o){var s=this.getActiveObjects(),u=this._activeObject;return!o||o&&u&&s.length>1&&s.indexOf(o)===-1&&u!==o&&!this._isSelectionKeyPressed(a)||o&&!o.evented||o&&!o.selectable&&u&&u!==o},_shouldCenterTransform:function(a,o,s){if(a){var u;return o==="scale"||o==="scaleX"||o==="scaleY"||o==="resizing"?u=this.centeredScaling||a.centeredScaling:o==="rotate"&&(u=this.centeredRotation||a.centeredRotation),u?!s:s}},_getOriginFromCorner:function(a,o){var s={x:a.originX,y:a.originY};return o==="ml"||o==="tl"||o==="bl"?s.x="right":(o==="mr"||o==="tr"||o==="br")&&(s.x="left"),o==="tl"||o==="mt"||o==="tr"?s.y="bottom":(o==="bl"||o==="mb"||o==="br")&&(s.y="top"),s},_getActionFromCorner:function(a,o,s,u){if(!o||!a)return"drag";var g=u.controls[o];return g.getActionName(s,g,u)},_setupCurrentTransform:function(a,o,s){if(o){var u=this.getPointer(a),g=o.__corner,f=o.controls[g],p=s&&g?f.getActionHandler(a,o,f):t.controlsUtils.dragHandler,v=this._getActionFromCorner(s,g,a,o),C=this._getOriginFromCorner(o,g),y=a[this.centeredKey],E={target:o,action:v,actionHandler:p,corner:g,scaleX:o.scaleX,scaleY:o.scaleY,skewX:o.skewX,skewY:o.skewY,offsetX:u.x-o.left,offsetY:u.y-o.top,originX:C.x,originY:C.y,ex:u.x,ey:u.y,lastX:u.x,lastY:u.y,theta:i(o.angle),width:o.width*o.scaleX,shiftKey:a.shiftKey,altKey:y,original:t.util.saveObjectTransform(o)};this._shouldCenterTransform(o,v,y)&&(E.originX="center",E.originY="center"),E.original.originX=C.x,E.original.originY=C.y,this._currentTransform=E,this._beforeTransform(a)}},setCursor:function(a){this.upperCanvasEl.style.cursor=a},_drawSelection:function(a){var o=this._groupSelector,s=new t.Point(o.ex,o.ey),u=t.util.transformPoint(s,this.viewportTransform),g=new t.Point(o.ex+o.left,o.ey+o.top),f=t.util.transformPoint(g,this.viewportTransform),p=Math.min(u.x,f.x),v=Math.min(u.y,f.y),C=Math.max(u.x,f.x),y=Math.max(u.y,f.y),E=this.selectionLineWidth/2;this.selectionColor&&(a.fillStyle=this.selectionColor,a.fillRect(p,v,C-p,y-v)),!(!this.selectionLineWidth||!this.selectionBorderColor)&&(a.lineWidth=this.selectionLineWidth,a.strokeStyle=this.selectionBorderColor,p+=E,v+=E,C-=E,y-=E,t.Object.prototype._setLineDash.call(this,a,this.selectionDashArray),a.strokeRect(p,v,C-p,y-v))},findTarget:function(a,o){if(!this.skipTargetFind){var s=!0,u=this.getPointer(a,s),g=this._activeObject,f=this.getActiveObjects(),p,v,C=h(a),y=f.length>1&&!o||f.length===1;if(this.targets=[],y&&g._findTargetCorner(u,C)||f.length>1&&!o&&g===this._searchPossibleTargets([g],u))return g;if(f.length===1&&g===this._searchPossibleTargets([g],u))if(this.preserveObjectStacking)p=g,v=this.targets,this.targets=[];else return g;var E=this._searchPossibleTargets(this._objects,u);return a[this.altSelectionKey]&&E&&p&&E!==p&&(E=p,this.targets=v),E}},_checkTarget:function(a,o,s){if(o&&o.visible&&o.evented&&o.containsPoint(a))if((this.perPixelTargetFind||o.perPixelTargetFind)&&!o.isEditing){var u=this.isTargetTransparent(o,s.x,s.y);if(!u)return!0}else return!0},_searchPossibleTargets:function(a,o){for(var s,u=a.length,g;u--;){var f=a[u],p=f.group?this._normalizePointer(f.group,o):o;if(this._checkTarget(p,f,o)){s=a[u],s.subTargetCheck&&s instanceof t.Group&&(g=this._searchPossibleTargets(s._objects,o),g&&this.targets.push(g));break}}return s},restorePointerVpt:function(a){return t.util.transformPoint(a,t.util.invertTransform(this.viewportTransform))},getPointer:function(a,o){if(this._absolutePointer&&!o)return this._absolutePointer;if(this._pointer&&o)return this._pointer;var s=c(a),u=this.upperCanvasEl,g=u.getBoundingClientRect(),f=g.width||0,p=g.height||0,v;(!f||!p)&&("top"in g&&"bottom"in g&&(p=Math.abs(g.top-g.bottom)),"right"in g&&"left"in g&&(f=Math.abs(g.right-g.left))),this.calcOffset(),s.x=s.x-this._offset.left,s.y=s.y-this._offset.top,o||(s=this.restorePointerVpt(s));var C=this.getRetinaScaling();return C!==1&&(s.x/=C,s.y/=C),f===0||p===0?v={width:1,height:1}:v={width:u.width/f,height:u.height/p},{x:s.x*v.width,y:s.y*v.height}},_createUpperCanvas:function(){var a=this.lowerCanvasEl.className.replace(/\s*lower-canvas\s*/,""),o=this.lowerCanvasEl,s=this.upperCanvasEl;s?s.className="":(s=this._createCanvasElement(),this.upperCanvasEl=s),t.util.addClass(s,"upper-canvas "+a),this.wrapperEl.appendChild(s),this._copyCanvasStyle(o,s),this._applyCanvasStyle(s),this.contextTop=s.getContext("2d")},getTopContext:function(){return this.contextTop},_createCacheCanvas:function(){this.cacheCanvasEl=this._createCanvasElement(),this.cacheCanvasEl.setAttribute("width",this.width),this.cacheCanvasEl.setAttribute("height",this.height),this.contextCache=this.cacheCanvasEl.getContext("2d")},_initWrapperElement:function(){this.wrapperEl=t.util.wrapElement(this.lowerCanvasEl,"div",{class:this.containerClass}),t.util.setStyle(this.wrapperEl,{width:this.width+"px",height:this.height+"px",position:"relative"}),t.util.makeElementUnselectable(this.wrapperEl)},_applyCanvasStyle:function(a){var o=this.width||a.width,s=this.height||a.height;t.util.setStyle(a,{position:"absolute",width:o+"px",height:s+"px",left:0,top:0,"touch-action":this.allowTouchScrolling?"manipulation":"none","-ms-touch-action":this.allowTouchScrolling?"manipulation":"none"}),a.width=o,a.height=s,t.util.makeElementUnselectable(a)},_copyCanvasStyle:function(a,o){o.style.cssText=a.style.cssText},getSelectionContext:function(){return this.contextTop},getSelectionElement:function(){return this.upperCanvasEl},getActiveObject:function(){return this._activeObject},getActiveObjects:function(){var a=this._activeObject;return a?a.type==="activeSelection"&&a._objects?a._objects.slice(0):[a]:[]},_onObjectRemoved:function(a){a===this._activeObject&&(this.fire("before:selection:cleared",{target:a}),this._discardActiveObject(),this.fire("selection:cleared",{target:a}),a.fire("deselected")),a===this._hoveredTarget&&(this._hoveredTarget=null,this._hoveredTargets=[]),this.callSuper("_onObjectRemoved",a)},_fireSelectionEvents:function(a,o){var s=!1,u=this.getActiveObjects(),g=[],f=[];a.forEach(function(p){u.indexOf(p)===-1&&(s=!0,p.fire("deselected",{e:o,target:p}),f.push(p))}),u.forEach(function(p){a.indexOf(p)===-1&&(s=!0,p.fire("selected",{e:o,target:p}),g.push(p))}),a.length>0&&u.length>0?s&&this.fire("selection:updated",{e:o,selected:g,deselected:f}):u.length>0?this.fire("selection:created",{e:o,selected:g}):a.length>0&&this.fire("selection:cleared",{e:o,deselected:f})},setActiveObject:function(a,o){var s=this.getActiveObjects();return this._setActiveObject(a,o),this._fireSelectionEvents(s,o),this},_setActiveObject:function(a,o){return this._activeObject===a||!this._discardActiveObject(o,a)||a.onSelect({e:o})?!1:(this._activeObject=a,!0)},_discardActiveObject:function(a,o){var s=this._activeObject;if(s){if(s.onDeselect({e:a,object:o}))return!1;this._activeObject=null}return!0},discardActiveObject:function(a){var o=this.getActiveObjects(),s=this.getActiveObject();return o.length&&this.fire("before:selection:cleared",{target:s,e:a}),this._discardActiveObject(a),this._fireSelectionEvents(o,a),this},dispose:function(){var a=this.wrapperEl;return this.removeListeners(),a.removeChild(this.upperCanvasEl),a.removeChild(this.lowerCanvasEl),this.contextCache=null,this.contextTop=null,["upperCanvasEl","cacheCanvasEl"].forEach(function(o){t.util.cleanUpJsdomNode(this[o]),this[o]=void 0}.bind(this)),a.parentNode&&a.parentNode.replaceChild(this.lowerCanvasEl,this.wrapperEl),delete this.wrapperEl,t.StaticCanvas.prototype.dispose.call(this),this},clear:function(){return this.discardActiveObject(),this.clearContext(this.contextTop),this.callSuper("clear")},drawControls:function(a){var o=this._activeObject;o&&o._renderControls(a)},_toObject:function(a,o,s){var u=this._realizeGroupTransformOnObject(a),g=this.callSuper("_toObject",a,o,s);return this._unwindGroupTransformOnObject(a,u),g},_realizeGroupTransformOnObject:function(a){if(a.group&&a.group.type==="activeSelection"&&this._activeObject===a.group){var o=["angle","flipX","flipY","left","scaleX","scaleY","skewX","skewY","top"],s={};return o.forEach(function(u){s[u]=a[u]}),t.util.addTransformToObject(a,this._activeObject.calcOwnMatrix()),s}else return null},_unwindGroupTransformOnObject:function(a,o){o&&a.set(o)},_setSVGObject:function(a,o,s){var u=this._realizeGroupTransformOnObject(o);this.callSuper("_setSVGObject",a,o,s),this._unwindGroupTransformOnObject(o,u)},setViewportTransform:function(a){this.renderOnAddRemove&&this._activeObject&&this._activeObject.isEditing&&this._activeObject.clearContextTop(),t.StaticCanvas.prototype.setViewportTransform.call(this,a)}});for(var A in t.StaticCanvas)A!=="prototype"&&(t.Canvas[A]=t.StaticCanvas[A])}(),function(){var c=t.util.addListener,i=t.util.removeListener,h=3,A=2,a=1,o={passive:!1};function s(u,g){return u.button&&u.button===g-1}t.util.object.extend(t.Canvas.prototype,{mainTouchId:null,_initEventListeners:function(){this.removeListeners(),this._bindEvents(),this.addOrRemove(c,"add")},_getEventPrefix:function(){return this.enablePointerEvents?"pointer":"mouse"},addOrRemove:function(u,g){var f=this.upperCanvasEl,p=this._getEventPrefix();u(t.window,"resize",this._onResize),u(f,p+"down",this._onMouseDown),u(f,p+"move",this._onMouseMove,o),u(f,p+"out",this._onMouseOut),u(f,p+"enter",this._onMouseEnter),u(f,"wheel",this._onMouseWheel),u(f,"contextmenu",this._onContextMenu),u(f,"dblclick",this._onDoubleClick),u(f,"dragover",this._onDragOver),u(f,"dragenter",this._onDragEnter),u(f,"dragleave",this._onDragLeave),u(f,"drop",this._onDrop),this.enablePointerEvents||u(f,"touchstart",this._onTouchStart,o),typeof eventjs<"u"&&g in eventjs&&(eventjs[g](f,"gesture",this._onGesture),eventjs[g](f,"drag",this._onDrag),eventjs[g](f,"orientation",this._onOrientationChange),eventjs[g](f,"shake",this._onShake),eventjs[g](f,"longpress",this._onLongPress))},removeListeners:function(){this.addOrRemove(i,"remove");var u=this._getEventPrefix();i(t.document,u+"up",this._onMouseUp),i(t.document,"touchend",this._onTouchEnd,o),i(t.document,u+"move",this._onMouseMove,o),i(t.document,"touchmove",this._onMouseMove,o)},_bindEvents:function(){this.eventsBound||(this._onMouseDown=this._onMouseDown.bind(this),this._onTouchStart=this._onTouchStart.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onResize=this._onResize.bind(this),this._onGesture=this._onGesture.bind(this),this._onDrag=this._onDrag.bind(this),this._onShake=this._onShake.bind(this),this._onLongPress=this._onLongPress.bind(this),this._onOrientationChange=this._onOrientationChange.bind(this),this._onMouseWheel=this._onMouseWheel.bind(this),this._onMouseOut=this._onMouseOut.bind(this),this._onMouseEnter=this._onMouseEnter.bind(this),this._onContextMenu=this._onContextMenu.bind(this),this._onDoubleClick=this._onDoubleClick.bind(this),this._onDragOver=this._onDragOver.bind(this),this._onDragEnter=this._simpleEventHandler.bind(this,"dragenter"),this._onDragLeave=this._simpleEventHandler.bind(this,"dragleave"),this._onDrop=this._onDrop.bind(this),this.eventsBound=!0)},_onGesture:function(u,g){this.__onTransformGesture&&this.__onTransformGesture(u,g)},_onDrag:function(u,g){this.__onDrag&&this.__onDrag(u,g)},_onMouseWheel:function(u){this.__onMouseWheel(u)},_onMouseOut:function(u){var g=this._hoveredTarget;this.fire("mouse:out",{target:g,e:u}),this._hoveredTarget=null,g&&g.fire("mouseout",{e:u});var f=this;this._hoveredTargets.forEach(function(p){f.fire("mouse:out",{target:g,e:u}),p&&g.fire("mouseout",{e:u})}),this._hoveredTargets=[]},_onMouseEnter:function(u){!this._currentTransform&&!this.findTarget(u)&&(this.fire("mouse:over",{target:null,e:u}),this._hoveredTarget=null,this._hoveredTargets=[])},_onOrientationChange:function(u,g){this.__onOrientationChange&&this.__onOrientationChange(u,g)},_onShake:function(u,g){this.__onShake&&this.__onShake(u,g)},_onLongPress:function(u,g){this.__onLongPress&&this.__onLongPress(u,g)},_onDragOver:function(u){u.preventDefault();var g=this._simpleEventHandler("dragover",u);this._fireEnterLeaveEvents(g,u)},_onDrop:function(u){return this._simpleEventHandler("drop:before",u),this._simpleEventHandler("drop",u)},_onContextMenu:function(u){return this.stopContextMenu&&(u.stopPropagation(),u.preventDefault()),!1},_onDoubleClick:function(u){this._cacheTransformEventData(u),this._handleEvent(u,"dblclick"),this._resetTransformEventData(u)},getPointerId:function(u){var g=u.changedTouches;return g?g[0]&&g[0].identifier:this.enablePointerEvents?u.pointerId:-1},_isMainEvent:function(u){return u.isPrimary===!0?!0:u.isPrimary===!1?!1:u.type==="touchend"&&u.touches.length===0?!0:u.changedTouches?u.changedTouches[0].identifier===this.mainTouchId:!0},_onTouchStart:function(u){u.preventDefault(),this.mainTouchId===null&&(this.mainTouchId=this.getPointerId(u)),this.__onMouseDown(u),this._resetTransformEventData();var g=this.upperCanvasEl,f=this._getEventPrefix();c(t.document,"touchend",this._onTouchEnd,o),c(t.document,"touchmove",this._onMouseMove,o),i(g,f+"down",this._onMouseDown)},_onMouseDown:function(u){this.__onMouseDown(u),this._resetTransformEventData();var g=this.upperCanvasEl,f=this._getEventPrefix();i(g,f+"move",this._onMouseMove,o),c(t.document,f+"up",this._onMouseUp),c(t.document,f+"move",this._onMouseMove,o)},_onTouchEnd:function(u){if(!(u.touches.length>0)){this.__onMouseUp(u),this._resetTransformEventData(),this.mainTouchId=null;var g=this._getEventPrefix();i(t.document,"touchend",this._onTouchEnd,o),i(t.document,"touchmove",this._onMouseMove,o);var f=this;this._willAddMouseDown&&clearTimeout(this._willAddMouseDown),this._willAddMouseDown=setTimeout(function(){c(f.upperCanvasEl,g+"down",f._onMouseDown),f._willAddMouseDown=0},400)}},_onMouseUp:function(u){this.__onMouseUp(u),this._resetTransformEventData();var g=this.upperCanvasEl,f=this._getEventPrefix();this._isMainEvent(u)&&(i(t.document,f+"up",this._onMouseUp),i(t.document,f+"move",this._onMouseMove,o),c(g,f+"move",this._onMouseMove,o))},_onMouseMove:function(u){!this.allowTouchScrolling&&u.preventDefault&&u.preventDefault(),this.__onMouseMove(u)},_onResize:function(){this.calcOffset()},_shouldRender:function(u){var g=this._activeObject;return!!g!=!!u||g&&u&&g!==u?!0:(g&&g.isEditing,!1)},__onMouseUp:function(u){var g,f=this._currentTransform,p=this._groupSelector,v=!1,C=!p||p.left===0&&p.top===0;if(this._cacheTransformEventData(u),g=this._target,this._handleEvent(u,"up:before"),s(u,h)){this.fireRightClick&&this._handleEvent(u,"up",h,C);return}if(s(u,A)){this.fireMiddleClick&&this._handleEvent(u,"up",A,C),this._resetTransformEventData();return}if(this.isDrawingMode&&this._isCurrentlyDrawing){this._onMouseUpInDrawingMode(u);return}if(this._isMainEvent(u)){if(f&&(this._finalizeCurrentTransform(u),v=f.actionPerformed),!C){var y=g===this._activeObject;this._maybeGroupObjects(u),v||(v=this._shouldRender(g)||!y&&g===this._activeObject)}var E,w;if(g){if(E=g._findTargetCorner(this.getPointer(u,!0),t.util.isTouchEvent(u)),g.selectable&&g!==this._activeObject&&g.activeOn==="up")this.setActiveObject(g,u),v=!0;else{var I=g.controls[E],S=I&&I.getMouseUpHandler(u,g,I);S&&(w=this.getPointer(u),S(u,f,w.x,w.y))}g.isMoving=!1}if(f&&(f.target!==g||f.corner!==E)){var D=f.target&&f.target.controls[f.corner],R=D&&D.getMouseUpHandler(u,g,I);w=w||this.getPointer(u),R&&R(u,f,w.x,w.y)}this._setCursorFromEvent(u,g),this._handleEvent(u,"up",a,C),this._groupSelector=null,this._currentTransform=null,g&&(g.__corner=0),v?this.requestRenderAll():C||this.renderTop()}},_simpleEventHandler:function(u,g){var f=this.findTarget(g),p=this.targets,v={e:g,target:f,subTargets:p};if(this.fire(u,v),f&&f.fire(u,v),!p)return f;for(var C=0;C1&&(a=new t.ActiveSelection(A.reverse(),{canvas:this}),this.setActiveObject(a,h))},_collectObjects:function(h){for(var A=[],a,o=this._groupSelector.ex,s=this._groupSelector.ey,u=o+this._groupSelector.left,g=s+this._groupSelector.top,f=new t.Point(c(o,u),c(s,g)),p=new t.Point(i(o,u),i(s,g)),v=!this.selectionFullyContained,C=o===u&&s===g,y=this._objects.length;y--&&(a=this._objects[y],!(!(!a||!a.selectable||!a.visible)&&(v&&a.intersectsWithRect(f,p,!0)||a.isContainedWithinRect(f,p,!0)||v&&a.containsPoint(f,null,!0)||v&&a.containsPoint(p,null,!0))&&(A.push(a),C))););return A.length>1&&(A=A.filter(function(E){return!E.onSelect({e:h})})),A},_maybeGroupObjects:function(h){this.selection&&this._groupSelector&&this._groupSelectedObjects(h),this.setCursor(this.defaultCursor),this._groupSelector=null}})}(),function(){t.util.object.extend(t.StaticCanvas.prototype,{toDataURL:function(c){c||(c={});var i=c.format||"png",h=c.quality||1,A=(c.multiplier||1)*(c.enableRetinaScaling?this.getRetinaScaling():1),a=this.toCanvasElement(A,c);return t.util.toDataURL(a,i,h)},toCanvasElement:function(c,i){c=c||1,i=i||{};var h=(i.width||this.width)*c,A=(i.height||this.height)*c,a=this.getZoom(),o=this.width,s=this.height,u=a*c,g=this.viewportTransform,f=(g[4]-(i.left||0))*c,p=(g[5]-(i.top||0))*c,v=this.interactive,C=[u,0,0,u,f,p],y=this.enableRetinaScaling,E=t.util.createCanvasElement(),w=this.contextTop;return E.width=h,E.height=A,this.contextTop=null,this.enableRetinaScaling=!1,this.interactive=!1,this.viewportTransform=C,this.width=h,this.height=A,this.calcViewportBoundaries(),this.renderCanvas(E.getContext("2d"),this._objects),this.viewportTransform=g,this.width=o,this.height=s,this.calcViewportBoundaries(),this.interactive=v,this.enableRetinaScaling=y,this.contextTop=w,E}})}(),t.util.object.extend(t.StaticCanvas.prototype,{loadFromJSON:function(c,i,h){if(c){var A=typeof c=="string"?JSON.parse(c):t.util.object.clone(c),a=this,o=A.clipPath,s=this.renderOnAddRemove;return this.renderOnAddRemove=!1,delete A.clipPath,this._enlivenObjects(A.objects,function(u){a.clear(),a._setBgOverlay(A,function(){o?a._enlivenObjects([o],function(g){a.clipPath=g[0],a.__setupCanvas.call(a,A,u,s,i)}):a.__setupCanvas.call(a,A,u,s,i)})},h),this}},__setupCanvas:function(c,i,h,A){var a=this;i.forEach(function(o,s){a.insertAt(o,s)}),this.renderOnAddRemove=h,delete c.objects,delete c.backgroundImage,delete c.overlayImage,delete c.background,delete c.overlay,this._setOptions(c),this.renderAll(),A&&A()},_setBgOverlay:function(c,i){var h={backgroundColor:!1,overlayColor:!1,backgroundImage:!1,overlayImage:!1};if(!c.backgroundImage&&!c.overlayImage&&!c.background&&!c.overlay){i&&i();return}var A=function(){h.backgroundImage&&h.overlayImage&&h.backgroundColor&&h.overlayColor&&i&&i()};this.__setBgOverlay("backgroundImage",c.backgroundImage,h,A),this.__setBgOverlay("overlayImage",c.overlayImage,h,A),this.__setBgOverlay("backgroundColor",c.background,h,A),this.__setBgOverlay("overlayColor",c.overlay,h,A)},__setBgOverlay:function(c,i,h,A){var a=this;if(!i){h[c]=!0,A&&A();return}c==="backgroundImage"||c==="overlayImage"?t.util.enlivenObjects([i],function(o){a[c]=o[0],h[c]=!0,A&&A()}):this["set"+t.util.string.capitalize(c,!0)](i,function(){h[c]=!0,A&&A()})},_enlivenObjects:function(c,i,h){if(!c||c.length===0){i&&i([]);return}t.util.enlivenObjects(c,function(A){i&&i(A)},null,h)},_toDataURL:function(c,i){this.clone(function(h){i(h.toDataURL(c))})},_toDataURLWithMultiplier:function(c,i,h){this.clone(function(A){h(A.toDataURLWithMultiplier(c,i))})},clone:function(c,i){var h=JSON.stringify(this.toJSON(i));this.cloneWithoutData(function(A){A.loadFromJSON(h,function(){c&&c(A)})})},cloneWithoutData:function(c){var i=t.util.createCanvasElement();i.width=this.width,i.height=this.height;var h=new t.Canvas(i);this.backgroundImage?(h.setBackgroundImage(this.backgroundImage.src,function(){h.renderAll(),c&&c(h)}),h.backgroundImageOpacity=this.backgroundImageOpacity,h.backgroundImageStretch=this.backgroundImageStretch):c&&c(h)}}),function(c){var i=c.fabric||(c.fabric={}),h=i.util.object.extend,A=i.util.object.clone,a=i.util.toFixed,o=i.util.string.capitalize,s=i.util.degreesToRadians,u=!i.isLikelyNode,g=2;i.Object||(i.Object=i.util.createClass(i.CommonMethods,{type:"object",originX:"left",originY:"top",top:0,left:0,width:0,height:0,scaleX:1,scaleY:1,flipX:!1,flipY:!1,opacity:1,angle:0,skewX:0,skewY:0,cornerSize:13,touchCornerSize:24,transparentCorners:!0,hoverCursor:null,moveCursor:null,padding:0,borderColor:"rgb(178,204,255)",borderDashArray:null,cornerColor:"rgb(178,204,255)",cornerStrokeColor:null,cornerStyle:"rect",cornerDashArray:null,centeredScaling:!1,centeredRotation:!0,fill:"rgb(0,0,0)",fillRule:"nonzero",globalCompositeOperation:"source-over",backgroundColor:"",selectionBackgroundColor:"",stroke:null,strokeWidth:1,strokeDashArray:null,strokeDashOffset:0,strokeLineCap:"butt",strokeLineJoin:"miter",strokeMiterLimit:4,shadow:null,borderOpacityWhenMoving:.4,borderScaleFactor:1,minScaleLimit:0,selectable:!0,evented:!0,visible:!0,hasControls:!0,hasBorders:!0,perPixelTargetFind:!1,includeDefaultValues:!0,lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,lockScalingFlip:!1,excludeFromExport:!1,objectCaching:u,statefullCache:!1,noScaleCache:!0,strokeUniform:!1,dirty:!0,__corner:0,paintFirst:"fill",activeOn:"down",stateProperties:"top left width height scaleX scaleY flipX flipY originX originY transformMatrix stroke strokeWidth strokeDashArray strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit angle opacity fill globalCompositeOperation shadow visible backgroundColor skewX skewY fillRule paintFirst clipPath strokeUniform".split(" "),cacheProperties:"fill stroke strokeWidth strokeDashArray width height paintFirst strokeUniform strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit backgroundColor clipPath".split(" "),colorProperties:"fill stroke backgroundColor".split(" "),clipPath:void 0,inverted:!1,absolutePositioned:!1,initialize:function(f){f&&this.setOptions(f)},_createCacheCanvas:function(){this._cacheProperties={},this._cacheCanvas=i.util.createCanvasElement(),this._cacheContext=this._cacheCanvas.getContext("2d"),this._updateCacheCanvas(),this.dirty=!0},_limitCacheSize:function(f){var p=i.perfLimitSizeTotal,v=f.width,C=f.height,y=i.maxCacheSideLimit,E=i.minCacheSideLimit;if(v<=y&&C<=y&&v*C<=p)return vD&&(f.zoomX/=v/D,f.width=D,f.capped=!0),C>R&&(f.zoomY/=C/R,f.height=R,f.capped=!0),f},_getCacheCanvasDimensions:function(){var f=this.getTotalObjectScaling(),p=this._getTransformedDimensions(0,0),v=p.x*f.scaleX/this.scaleX,C=p.y*f.scaleY/this.scaleY;return{width:v+g,height:C+g,zoomX:f.scaleX,zoomY:f.scaleY,x:v,y:C}},_updateCacheCanvas:function(){var f=this.canvas;if(this.noScaleCache&&f&&f._currentTransform){var p=f._currentTransform.target,v=f._currentTransform.action;if(this===p&&v.slice&&v.slice(0,5)==="scale")return!1}var C=this._cacheCanvas,y=this._limitCacheSize(this._getCacheCanvasDimensions()),E=i.minCacheSideLimit,w=y.width,I=y.height,S,D,R=y.zoomX,J=y.zoomY,ee=w!==this.cacheWidth||I!==this.cacheHeight,Z=this.zoomX!==R||this.zoomY!==J,te=ee||Z,re=0,oe=0,H=!1;if(ee){var L=this._cacheCanvas.width,B=this._cacheCanvas.height,b=w>L||I>B,Q=(wE&&B>E;H=b||Q,b&&!y.capped&&(w>E||I>E)&&(re=w*.1,oe=I*.1)}return this instanceof i.Text&&this.path&&(te=!0,H=!0,re+=this.getHeightOfLine(0)*this.zoomX,oe+=this.getHeightOfLine(0)*this.zoomY),te?(H?(C.width=Math.ceil(w+re),C.height=Math.ceil(I+oe)):(this._cacheContext.setTransform(1,0,0,1,0,0),this._cacheContext.clearRect(0,0,C.width,C.height)),S=y.x/2,D=y.y/2,this.cacheTranslationX=Math.round(C.width/2-S)+S,this.cacheTranslationY=Math.round(C.height/2-D)+D,this.cacheWidth=w,this.cacheHeight=I,this._cacheContext.translate(this.cacheTranslationX,this.cacheTranslationY),this._cacheContext.scale(R,J),this.zoomX=R,this.zoomY=J,!0):!1},setOptions:function(f){this._setOptions(f),this._initGradient(f.fill,"fill"),this._initGradient(f.stroke,"stroke"),this._initPattern(f.fill,"fill"),this._initPattern(f.stroke,"stroke")},transform:function(f){var p=this.group&&!this.group._transformDone||this.group&&this.canvas&&f===this.canvas.contextTop,v=this.calcTransformMatrix(!p);f.transform(v[0],v[1],v[2],v[3],v[4],v[5])},toObject:function(f){var p=i.Object.NUM_FRACTION_DIGITS,v={type:this.type,version:i.version,originX:this.originX,originY:this.originY,left:a(this.left,p),top:a(this.top,p),width:a(this.width,p),height:a(this.height,p),fill:this.fill&&this.fill.toObject?this.fill.toObject():this.fill,stroke:this.stroke&&this.stroke.toObject?this.stroke.toObject():this.stroke,strokeWidth:a(this.strokeWidth,p),strokeDashArray:this.strokeDashArray?this.strokeDashArray.concat():this.strokeDashArray,strokeLineCap:this.strokeLineCap,strokeDashOffset:this.strokeDashOffset,strokeLineJoin:this.strokeLineJoin,strokeUniform:this.strokeUniform,strokeMiterLimit:a(this.strokeMiterLimit,p),scaleX:a(this.scaleX,p),scaleY:a(this.scaleY,p),angle:a(this.angle,p),flipX:this.flipX,flipY:this.flipY,opacity:a(this.opacity,p),shadow:this.shadow&&this.shadow.toObject?this.shadow.toObject():this.shadow,visible:this.visible,backgroundColor:this.backgroundColor,fillRule:this.fillRule,paintFirst:this.paintFirst,globalCompositeOperation:this.globalCompositeOperation,skewX:a(this.skewX,p),skewY:a(this.skewY,p)};return this.clipPath&&!this.clipPath.excludeFromExport&&(v.clipPath=this.clipPath.toObject(f),v.clipPath.inverted=this.clipPath.inverted,v.clipPath.absolutePositioned=this.clipPath.absolutePositioned),i.util.populateWithProperties(this,v,f),this.includeDefaultValues||(v=this._removeDefaultValues(v)),v},toDatalessObject:function(f){return this.toObject(f)},_removeDefaultValues:function(f){var p=i.util.getKlass(f.type).prototype,v=p.stateProperties;return v.forEach(function(C){C==="left"||C==="top"||(f[C]===p[C]&&delete f[C],Array.isArray(f[C])&&Array.isArray(p[C])&&f[C].length===0&&p[C].length===0&&delete f[C])}),f},toString:function(){return"#"},getObjectScaling:function(){if(!this.group)return{scaleX:this.scaleX,scaleY:this.scaleY};var f=i.util.qrDecompose(this.calcTransformMatrix());return{scaleX:Math.abs(f.scaleX),scaleY:Math.abs(f.scaleY)}},getTotalObjectScaling:function(){var f=this.getObjectScaling(),p=f.scaleX,v=f.scaleY;if(this.canvas){var C=this.canvas.getZoom(),y=this.canvas.getRetinaScaling();p*=C*y,v*=C*y}return{scaleX:p,scaleY:v}},getObjectOpacity:function(){var f=this.opacity;return this.group&&(f*=this.group.getObjectOpacity()),f},_set:function(f,p){var v=f==="scaleX"||f==="scaleY",C=this[f]!==p,y=!1;return v&&(p=this._constrainScale(p)),f==="scaleX"&&p<0?(this.flipX=!this.flipX,p*=-1):f==="scaleY"&&p<0?(this.flipY=!this.flipY,p*=-1):f==="shadow"&&p&&!(p instanceof i.Shadow)?p=new i.Shadow(p):f==="dirty"&&this.group&&this.group.set("dirty",p),this[f]=p,C&&(y=this.group&&this.group.isOnACache(),this.cacheProperties.indexOf(f)>-1?(this.dirty=!0,y&&this.group.set("dirty",!0)):y&&this.stateProperties.indexOf(f)>-1&&this.group.set("dirty",!0)),this},setOnGroup:function(){},getViewportTransform:function(){return this.canvas&&this.canvas.viewportTransform?this.canvas.viewportTransform:i.iMatrix.concat()},isNotVisible:function(){return this.opacity===0||!this.width&&!this.height&&this.strokeWidth===0||!this.visible},render:function(f){this.isNotVisible()||this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(f.save(),this._setupCompositeOperation(f),this.drawSelectionBackground(f),this.transform(f),this._setOpacity(f),this._setShadow(f,this),this.shouldCache()?(this.renderCache(),this.drawCacheOnCanvas(f)):(this._removeCacheCanvas(),this.dirty=!1,this.drawObject(f),this.objectCaching&&this.statefullCache&&this.saveState({propertySet:"cacheProperties"})),f.restore())},renderCache:function(f){f=f||{},(!this._cacheCanvas||!this._cacheContext)&&this._createCacheCanvas(),this.isCacheDirty()&&(this.statefullCache&&this.saveState({propertySet:"cacheProperties"}),this.drawObject(this._cacheContext,f.forClipping),this.dirty=!1)},_removeCacheCanvas:function(){this._cacheCanvas=null,this._cacheContext=null,this.cacheWidth=0,this.cacheHeight=0},hasStroke:function(){return this.stroke&&this.stroke!=="transparent"&&this.strokeWidth!==0},hasFill:function(){return this.fill&&this.fill!=="transparent"},needsItsOwnCache:function(){return!!(this.paintFirst==="stroke"&&this.hasFill()&&this.hasStroke()&&typeof this.shadow=="object"||this.clipPath)},shouldCache:function(){return this.ownCaching=this.needsItsOwnCache()||this.objectCaching&&(!this.group||!this.group.isOnACache()),this.ownCaching},willDrawShadow:function(){return!!this.shadow&&(this.shadow.offsetX!==0||this.shadow.offsetY!==0)},drawClipPathOnCache:function(f,p){if(f.save(),p.inverted?f.globalCompositeOperation="destination-out":f.globalCompositeOperation="destination-in",p.absolutePositioned){var v=i.util.invertTransform(this.calcTransformMatrix());f.transform(v[0],v[1],v[2],v[3],v[4],v[5])}p.transform(f),f.scale(1/p.zoomX,1/p.zoomY),f.drawImage(p._cacheCanvas,-p.cacheTranslationX,-p.cacheTranslationY),f.restore()},drawObject:function(f,p){var v=this.fill,C=this.stroke;p?(this.fill="black",this.stroke="",this._setClippingProperties(f)):this._renderBackground(f),this._render(f),this._drawClipPath(f,this.clipPath),this.fill=v,this.stroke=C},_drawClipPath:function(f,p){p&&(p.canvas=this.canvas,p.shouldCache(),p._transformDone=!0,p.renderCache({forClipping:!0}),this.drawClipPathOnCache(f,p))},drawCacheOnCanvas:function(f){f.scale(1/this.zoomX,1/this.zoomY),f.drawImage(this._cacheCanvas,-this.cacheTranslationX,-this.cacheTranslationY)},isCacheDirty:function(f){if(this.isNotVisible())return!1;if(this._cacheCanvas&&this._cacheContext&&!f&&this._updateCacheCanvas())return!0;if(this.dirty||this.clipPath&&this.clipPath.absolutePositioned||this.statefullCache&&this.hasStateChanged("cacheProperties")){if(this._cacheCanvas&&this._cacheContext&&!f){var p=this.cacheWidth/this.zoomX,v=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-p/2,-v/2,p,v)}return!0}return!1},_renderBackground:function(f){if(this.backgroundColor){var p=this._getNonTransformedDimensions();f.fillStyle=this.backgroundColor,f.fillRect(-p.x/2,-p.y/2,p.x,p.y),this._removeShadow(f)}},_setOpacity:function(f){this.group&&!this.group._transformDone?f.globalAlpha=this.getObjectOpacity():f.globalAlpha*=this.opacity},_setStrokeStyles:function(f,p){var v=p.stroke;v&&(f.lineWidth=p.strokeWidth,f.lineCap=p.strokeLineCap,f.lineDashOffset=p.strokeDashOffset,f.lineJoin=p.strokeLineJoin,f.miterLimit=p.strokeMiterLimit,v.toLive?v.gradientUnits==="percentage"||v.gradientTransform||v.patternTransform?this._applyPatternForTransformedGradient(f,v):(f.strokeStyle=v.toLive(f,this),this._applyPatternGradientTransform(f,v)):f.strokeStyle=p.stroke)},_setFillStyles:function(f,p){var v=p.fill;v&&(v.toLive?(f.fillStyle=v.toLive(f,this),this._applyPatternGradientTransform(f,p.fill)):f.fillStyle=v)},_setClippingProperties:function(f){f.globalAlpha=1,f.strokeStyle="transparent",f.fillStyle="#000000"},_setLineDash:function(f,p){!p||p.length===0||(1&p.length&&p.push.apply(p,p),f.setLineDash(p))},_renderControls:function(f,p){var v=this.getViewportTransform(),C=this.calcTransformMatrix(),y,E,w;p=p||{},E=typeof p.hasBorders<"u"?p.hasBorders:this.hasBorders,w=typeof p.hasControls<"u"?p.hasControls:this.hasControls,C=i.util.multiplyTransformMatrices(v,C),y=i.util.qrDecompose(C),f.save(),f.translate(y.translateX,y.translateY),f.lineWidth=1*this.borderScaleFactor,this.group||(f.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1),this.flipX&&(y.angle-=180),f.rotate(s(this.group?y.angle:this.angle)),p.forActiveSelection||this.group?E&&this.drawBordersInGroup(f,y,p):E&&this.drawBorders(f,p),w&&this.drawControls(f,p),f.restore()},_setShadow:function(f){if(this.shadow){var p=this.shadow,v=this.canvas,C,y=v&&v.viewportTransform[0]||1,E=v&&v.viewportTransform[3]||1;p.nonScaling?C={scaleX:1,scaleY:1}:C=this.getObjectScaling(),v&&v._isRetinaScaling()&&(y*=i.devicePixelRatio,E*=i.devicePixelRatio),f.shadowColor=p.color,f.shadowBlur=p.blur*i.browserShadowBlurConstant*(y+E)*(C.scaleX+C.scaleY)/4,f.shadowOffsetX=p.offsetX*y*C.scaleX,f.shadowOffsetY=p.offsetY*E*C.scaleY}},_removeShadow:function(f){this.shadow&&(f.shadowColor="",f.shadowBlur=f.shadowOffsetX=f.shadowOffsetY=0)},_applyPatternGradientTransform:function(f,p){if(!p||!p.toLive)return{offsetX:0,offsetY:0};var v=p.gradientTransform||p.patternTransform,C=-this.width/2+p.offsetX||0,y=-this.height/2+p.offsetY||0;return p.gradientUnits==="percentage"?f.transform(this.width,0,0,this.height,C,y):f.transform(1,0,0,1,C,y),v&&f.transform(v[0],v[1],v[2],v[3],v[4],v[5]),{offsetX:C,offsetY:y}},_renderPaintInOrder:function(f){this.paintFirst==="stroke"?(this._renderStroke(f),this._renderFill(f)):(this._renderFill(f),this._renderStroke(f))},_render:function(){},_renderFill:function(f){this.fill&&(f.save(),this._setFillStyles(f,this),this.fillRule==="evenodd"?f.fill("evenodd"):f.fill(),f.restore())},_renderStroke:function(f){if(!(!this.stroke||this.strokeWidth===0)){if(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(f),f.save(),this.strokeUniform&&this.group){var p=this.getObjectScaling();f.scale(1/p.scaleX,1/p.scaleY)}else this.strokeUniform&&f.scale(1/this.scaleX,1/this.scaleY);this._setLineDash(f,this.strokeDashArray),this._setStrokeStyles(f,this),f.stroke(),f.restore()}},_applyPatternForTransformedGradient:function(f,p){var v=this._limitCacheSize(this._getCacheCanvasDimensions()),C=i.util.createCanvasElement(),y,E=this.canvas.getRetinaScaling(),w=v.x/this.scaleX/E,I=v.y/this.scaleY/E;C.width=w,C.height=I,y=C.getContext("2d"),y.beginPath(),y.moveTo(0,0),y.lineTo(w,0),y.lineTo(w,I),y.lineTo(0,I),y.closePath(),y.translate(w/2,I/2),y.scale(v.zoomX/this.scaleX/E,v.zoomY/this.scaleY/E),this._applyPatternGradientTransform(y,p),y.fillStyle=p.toLive(f),y.fill(),f.translate(-this.width/2-this.strokeWidth/2,-this.height/2-this.strokeWidth/2),f.scale(E*this.scaleX/v.zoomX,E*this.scaleY/v.zoomY),f.strokeStyle=y.createPattern(C,"no-repeat")},_findCenterFromElement:function(){return{x:this.left+this.width/2,y:this.top+this.height/2}},_assignTransformMatrixProps:function(){if(this.transformMatrix){var f=i.util.qrDecompose(this.transformMatrix);this.flipX=!1,this.flipY=!1,this.set("scaleX",f.scaleX),this.set("scaleY",f.scaleY),this.angle=f.angle,this.skewX=f.skewX,this.skewY=0}},_removeTransformMatrix:function(f){var p=this._findCenterFromElement();this.transformMatrix&&(this._assignTransformMatrixProps(),p=i.util.transformPoint(p,this.transformMatrix)),this.transformMatrix=null,f&&(this.scaleX*=f.scaleX,this.scaleY*=f.scaleY,this.cropX=f.cropX,this.cropY=f.cropY,p.x+=f.offsetLeft,p.y+=f.offsetTop,this.width=f.width,this.height=f.height),this.setPositionByOrigin(p,"center","center")},clone:function(f,p){var v=this.toObject(p);this.constructor.fromObject?this.constructor.fromObject(v,f):i.Object._fromObject("Object",v,f)},cloneAsImage:function(f,p){var v=this.toCanvasElement(p);return f&&f(new i.Image(v)),this},toCanvasElement:function(f){f||(f={});var p=i.util,v=p.saveObjectTransform(this),C=this.group,y=this.shadow,E=Math.abs,w=(f.multiplier||1)*(f.enableRetinaScaling?i.devicePixelRatio:1);delete this.group,f.withoutTransform&&p.resetObjectTransform(this),f.withoutShadow&&(this.shadow=null);var I=i.util.createCanvasElement(),S=this.getBoundingRect(!0,!0),D=this.shadow,R,J={x:0,y:0},ee,Z,te;D&&(ee=D.blur,D.nonScaling?R={scaleX:1,scaleY:1}:R=this.getObjectScaling(),J.x=2*Math.round(E(D.offsetX)+ee)*E(R.scaleX),J.y=2*Math.round(E(D.offsetY)+ee)*E(R.scaleY)),Z=S.width+J.x,te=S.height+J.y,I.width=Math.ceil(Z),I.height=Math.ceil(te);var re=new i.StaticCanvas(I,{enableRetinaScaling:!1,renderOnAddRemove:!1,skipOffscreen:!1});f.format==="jpeg"&&(re.backgroundColor="#fff"),this.setPositionByOrigin(new i.Point(re.width/2,re.height/2),"center","center");var oe=this.canvas;re.add(this);var H=re.toCanvasElement(w||1,f);return this.shadow=y,this.set("canvas",oe),C&&(this.group=C),this.set(v).setCoords(),re._objects=[],re.dispose(),re=null,H},toDataURL:function(f){return f||(f={}),i.util.toDataURL(this.toCanvasElement(f),f.format||"png",f.quality||1)},isType:function(f){return arguments.length>1?Array.from(arguments).includes(this.type):this.type===f},complexity:function(){return 1},toJSON:function(f){return this.toObject(f)},rotate:function(f){var p=(this.originX!=="center"||this.originY!=="center")&&this.centeredRotation;return p&&this._setOriginToCenter(),this.set("angle",f),p&&this._resetOrigin(),this},centerH:function(){return this.canvas&&this.canvas.centerObjectH(this),this},viewportCenterH:function(){return this.canvas&&this.canvas.viewportCenterObjectH(this),this},centerV:function(){return this.canvas&&this.canvas.centerObjectV(this),this},viewportCenterV:function(){return this.canvas&&this.canvas.viewportCenterObjectV(this),this},center:function(){return this.canvas&&this.canvas.centerObject(this),this},viewportCenter:function(){return this.canvas&&this.canvas.viewportCenterObject(this),this},getLocalPointer:function(f,p){p=p||this.canvas.getPointer(f);var v=new i.Point(p.x,p.y),C=this._getLeftTopCoords();return this.angle&&(v=i.util.rotatePoint(v,C,s(-this.angle))),{x:v.x-C.x,y:v.y-C.y}},_setupCompositeOperation:function(f){this.globalCompositeOperation&&(f.globalCompositeOperation=this.globalCompositeOperation)},dispose:function(){i.runningAnimations&&i.runningAnimations.cancelByTarget(this)}}),i.util.createAccessors&&i.util.createAccessors(i.Object),h(i.Object.prototype,i.Observable),i.Object.NUM_FRACTION_DIGITS=2,i.Object.ENLIVEN_PROPS=["clipPath"],i.Object._fromObject=function(f,p,v,C){var y=i[f];p=A(p,!0),i.util.enlivenPatterns([p.fill,p.stroke],function(E){typeof E[0]<"u"&&(p.fill=E[0]),typeof E[1]<"u"&&(p.stroke=E[1]),i.util.enlivenObjectEnlivables(p,p,function(){var w=C?new y(p[C],p):new y(p);v&&v(w)})})},i.Object.__uid=0)}(e),function(){var c=t.util.degreesToRadians,i={left:-.5,center:0,right:.5},h={top:-.5,center:0,bottom:.5};t.util.object.extend(t.Object.prototype,{translateToGivenOrigin:function(A,a,o,s,u){var g=A.x,f=A.y,p,v,C;return typeof a=="string"?a=i[a]:a-=.5,typeof s=="string"?s=i[s]:s-=.5,p=s-a,typeof o=="string"?o=h[o]:o-=.5,typeof u=="string"?u=h[u]:u-=.5,v=u-o,(p||v)&&(C=this._getTransformedDimensions(),g=A.x+p*C.x,f=A.y+v*C.y),new t.Point(g,f)},translateToCenterPoint:function(A,a,o){var s=this.translateToGivenOrigin(A,a,o,"center","center");return this.angle?t.util.rotatePoint(s,A,c(this.angle)):s},translateToOriginPoint:function(A,a,o){var s=this.translateToGivenOrigin(A,"center","center",a,o);return this.angle?t.util.rotatePoint(s,A,c(this.angle)):s},getCenterPoint:function(){var A=new t.Point(this.left,this.top);return this.translateToCenterPoint(A,this.originX,this.originY)},getPointByOrigin:function(A,a){var o=this.getCenterPoint();return this.translateToOriginPoint(o,A,a)},toLocalPoint:function(A,a,o){var s=this.getCenterPoint(),u,g;return typeof a<"u"&&typeof o<"u"?u=this.translateToGivenOrigin(s,"center","center",a,o):u=new t.Point(this.left,this.top),g=new t.Point(A.x,A.y),this.angle&&(g=t.util.rotatePoint(g,s,-c(this.angle))),g.subtractEquals(u)},setPositionByOrigin:function(A,a,o){var s=this.translateToCenterPoint(A,a,o),u=this.translateToOriginPoint(s,this.originX,this.originY);this.set("left",u.x),this.set("top",u.y)},adjustPosition:function(A){var a=c(this.angle),o=this.getScaledWidth(),s=t.util.cos(a)*o,u=t.util.sin(a)*o,g,f;typeof this.originX=="string"?g=i[this.originX]:g=this.originX-.5,typeof A=="string"?f=i[A]:f=A-.5,this.left+=s*(f-g),this.top+=u*(f-g),this.setCoords(),this.originX=A},_setOriginToCenter:function(){this._originalOriginX=this.originX,this._originalOriginY=this.originY;var A=this.getCenterPoint();this.originX="center",this.originY="center",this.left=A.x,this.top=A.y},_resetOrigin:function(){var A=this.translateToOriginPoint(this.getCenterPoint(),this._originalOriginX,this._originalOriginY);this.originX=this._originalOriginX,this.originY=this._originalOriginY,this.left=A.x,this.top=A.y,this._originalOriginX=null,this._originalOriginY=null},_getLeftTopCoords:function(){return this.translateToOriginPoint(this.getCenterPoint(),"left","top")}})}(),function(){function c(o){return[new t.Point(o.tl.x,o.tl.y),new t.Point(o.tr.x,o.tr.y),new t.Point(o.br.x,o.br.y),new t.Point(o.bl.x,o.bl.y)]}var i=t.util,h=i.degreesToRadians,A=i.multiplyTransformMatrices,a=i.transformPoint;i.object.extend(t.Object.prototype,{oCoords:null,aCoords:null,lineCoords:null,ownMatrixCache:null,matrixCache:null,controls:{},_getCoords:function(o,s){return s?o?this.calcACoords():this.calcLineCoords():((!this.aCoords||!this.lineCoords)&&this.setCoords(!0),o?this.aCoords:this.lineCoords)},getCoords:function(o,s){return c(this._getCoords(o,s))},intersectsWithRect:function(o,s,u,g){var f=this.getCoords(u,g),p=t.Intersection.intersectPolygonRectangle(f,o,s);return p.status==="Intersection"},intersectsWithObject:function(o,s,u){var g=t.Intersection.intersectPolygonPolygon(this.getCoords(s,u),o.getCoords(s,u));return g.status==="Intersection"||o.isContainedWithinObject(this,s,u)||this.isContainedWithinObject(o,s,u)},isContainedWithinObject:function(o,s,u){for(var g=this.getCoords(s,u),f=s?o.aCoords:o.lineCoords,p=0,v=o._getImageLines(f);p<4;p++)if(!o.containsPoint(g[p],v))return!1;return!0},isContainedWithinRect:function(o,s,u,g){var f=this.getBoundingRect(u,g);return f.left>=o.x&&f.left+f.width<=s.x&&f.top>=o.y&&f.top+f.height<=s.y},containsPoint:function(o,p,u,g){var f=this._getCoords(u,g),p=p||this._getImageLines(f),v=this._findCrossPoints(o,p);return v!==0&&v%2===1},isOnScreen:function(o){if(!this.canvas)return!1;var s=this.canvas.vptCoords.tl,u=this.canvas.vptCoords.br,g=this.getCoords(!0,o);return g.some(function(f){return f.x<=u.x&&f.x>=s.x&&f.y<=u.y&&f.y>=s.y})||this.intersectsWithRect(s,u,!0,o)?!0:this._containsCenterOfCanvas(s,u,o)},_containsCenterOfCanvas:function(o,s,u){var g={x:(o.x+s.x)/2,y:(o.y+s.y)/2};return!!this.containsPoint(g,null,!0,u)},isPartiallyOnScreen:function(o){if(!this.canvas)return!1;var s=this.canvas.vptCoords.tl,u=this.canvas.vptCoords.br;if(this.intersectsWithRect(s,u,!0,o))return!0;var g=this.getCoords(!0,o).every(function(f){return(f.x>=u.x||f.x<=s.x)&&(f.y>=u.y||f.y<=s.y)});return g&&this._containsCenterOfCanvas(s,u,o)},_getImageLines:function(o){var s={topline:{o:o.tl,d:o.tr},rightline:{o:o.tr,d:o.br},bottomline:{o:o.br,d:o.bl},leftline:{o:o.bl,d:o.tl}};return s},_findCrossPoints:function(o,s){var u,g,f,p,v,C=0,y;for(var E in s)if(y=s[E],!(y.o.y=o.y&&y.d.y>=o.y)&&(y.o.x===y.d.x&&y.o.x>=o.x?v=y.o.x:(u=0,g=(y.d.y-y.o.y)/(y.d.x-y.o.x),f=o.y-u*o.x,p=y.o.y-g*y.o.x,v=-(f-p)/(u-g)),v>=o.x&&(C+=1),C===2))break;return C},getBoundingRect:function(o,s){var u=this.getCoords(o,s);return i.makeBoundingBoxFromPoints(u)},getScaledWidth:function(){return this._getTransformedDimensions().x},getScaledHeight:function(){return this._getTransformedDimensions().y},_constrainScale:function(o){return Math.abs(o)"u"&&(o=this.skewX),typeof s>"u"&&(s=this.skewY);var u,g,f,p=o===0&&s===0;if(this.strokeUniform?(g=this.width,f=this.height):(u=this._getNonTransformedDimensions(),g=u.x,f=u.y),p)return this._finalizeDimensions(g*this.scaleX,f*this.scaleY);var v=i.sizeAfterTransform(g,f,{scaleX:this.scaleX,scaleY:this.scaleY,skewX:o,skewY:s});return this._finalizeDimensions(v.x,v.y)},_finalizeDimensions:function(o,s){return this.strokeUniform?{x:o+this.strokeWidth,y:s+this.strokeWidth}:{x:o,y:s}},_calculateCurrentDimensions:function(){var o=this.getViewportTransform(),s=this._getTransformedDimensions(),u=a(s,o,!0);return u.scalarAdd(2*this.padding)}})}(),t.util.object.extend(t.Object.prototype,{sendToBack:function(){return this.group?t.StaticCanvas.prototype.sendToBack.call(this.group,this):this.canvas&&this.canvas.sendToBack(this),this},bringToFront:function(){return this.group?t.StaticCanvas.prototype.bringToFront.call(this.group,this):this.canvas&&this.canvas.bringToFront(this),this},sendBackwards:function(c){return this.group?t.StaticCanvas.prototype.sendBackwards.call(this.group,this,c):this.canvas&&this.canvas.sendBackwards(this,c),this},bringForward:function(c){return this.group?t.StaticCanvas.prototype.bringForward.call(this.group,this,c):this.canvas&&this.canvas.bringForward(this,c),this},moveTo:function(c){return this.group&&this.group.type!=="activeSelection"?t.StaticCanvas.prototype.moveTo.call(this.group,this,c):this.canvas&&this.canvas.moveTo(this,c),this}}),function(){function c(h,A){if(A){if(A.toLive)return h+": url(#SVGID_"+A.id+"); ";var a=new t.Color(A),o=h+": "+a.toRgb()+"; ",s=a.getAlpha();return s!==1&&(o+=h+"-opacity: "+s.toString()+"; "),o}else return h+": none; "}var i=t.util.toFixed;t.util.object.extend(t.Object.prototype,{getSvgStyles:function(h){var A=this.fillRule?this.fillRule:"nonzero",a=this.strokeWidth?this.strokeWidth:"0",o=this.strokeDashArray?this.strokeDashArray.join(" "):"none",s=this.strokeDashOffset?this.strokeDashOffset:"0",u=this.strokeLineCap?this.strokeLineCap:"butt",g=this.strokeLineJoin?this.strokeLineJoin:"miter",f=this.strokeMiterLimit?this.strokeMiterLimit:"4",p=typeof this.opacity<"u"?this.opacity:"1",v=this.visible?"":" visibility: hidden;",C=h?"":this.getSvgFilter(),y=c("fill",this.fill),E=c("stroke",this.stroke);return[E,"stroke-width: ",a,"; ","stroke-dasharray: ",o,"; ","stroke-linecap: ",u,"; ","stroke-dashoffset: ",s,"; ","stroke-linejoin: ",g,"; ","stroke-miterlimit: ",f,"; ",y,"fill-rule: ",A,"; ","opacity: ",p,";",C,v].join("")},getSvgSpanStyles:function(h,A){var a="; ",s=h.fontFamily?"font-family: "+(h.fontFamily.indexOf("'")===-1&&h.fontFamily.indexOf('"')===-1?"'"+h.fontFamily+"'":h.fontFamily)+a:"",o=h.strokeWidth?"stroke-width: "+h.strokeWidth+a:"",s=s,u=h.fontSize?"font-size: "+h.fontSize+"px"+a:"",g=h.fontStyle?"font-style: "+h.fontStyle+a:"",f=h.fontWeight?"font-weight: "+h.fontWeight+a:"",p=h.fill?c("fill",h.fill):"",v=h.stroke?c("stroke",h.stroke):"",C=this.getSvgTextDecoration(h),y=h.deltaY?"baseline-shift: "+-h.deltaY+"; ":"";return C&&(C="text-decoration: "+C+a),[v,o,s,u,g,f,C,p,y,A?"white-space: pre; ":""].join("")},getSvgTextDecoration:function(h){return["overline","underline","line-through"].filter(function(A){return h[A.replace("-","")]}).join(" ")},getSvgFilter:function(){return this.shadow?"filter: url(#SVGID_"+this.shadow.id+");":""},getSvgCommons:function(){return[this.id?'id="'+this.id+'" ':"",this.clipPath?'clip-path="url(#'+this.clipPath.clipPathId+')" ':""].join("")},getSvgTransform:function(h,A){var a=h?this.calcTransformMatrix():this.calcOwnMatrix(),o='transform="'+t.util.matrixToSVG(a);return o+(A||"")+'" '},_setSVGBg:function(h){if(this.backgroundColor){var A=t.Object.NUM_FRACTION_DIGITS;h.push(" -`)}},toSVG:function(h){return this._createBaseSVGMarkup(this._toSVG(h),{reviver:h})},toClipPathSVG:function(h){return" "+this._createBaseClipPathSVGMarkup(this._toSVG(h),{reviver:h})},_createBaseClipPathSVGMarkup:function(h,A){A=A||{};var a=A.reviver,o=A.additionalTransform||"",s=[this.getSvgTransform(!0,o),this.getSvgCommons()].join(""),u=h.indexOf("COMMON_PARTS");return h[u]=s,a?a(h.join("")):h.join("")},_createBaseSVGMarkup:function(h,A){A=A||{};var a=A.noStyle,o=A.reviver,s=a?"":'style="'+this.getSvgStyles()+'" ',u=A.withShadow?'style="'+this.getSvgFilter()+'" ':"",g=this.clipPath,f=this.strokeUniform?'vector-effect="non-scaling-stroke" ':"",p=g&&g.absolutePositioned,v=this.stroke,C=this.fill,y=this.shadow,E,w=[],I,S=h.indexOf("COMMON_PARTS"),D=A.additionalTransform;return g&&(g.clipPathId="CLIPPATH_"+t.Object.__uid++,I=' +`)},sendToBack:function(f){if(!f)return this;var p=this._activeObject,v,C,y;if(f===p&&f.type==="activeSelection")for(y=p._objects,v=y.length;v--;)C=y[v],h(this._objects,C),this._objects.unshift(C);else h(this._objects,f),this._objects.unshift(f);return this.renderOnAddRemove&&this.requestRenderAll(),this},bringToFront:function(f){if(!f)return this;var p=this._activeObject,v,C,y;if(f===p&&f.type==="activeSelection")for(y=p._objects,v=0;v0+S&&(w=E-1,h(this._objects,y),this._objects.splice(w,0,y)),S++;else E=this._objects.indexOf(f),E!==0&&(w=this._findNewLowerIndex(f,E,p),h(this._objects,f),this._objects.splice(w,0,f));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewLowerIndex:function(f,p,v){var C,y;if(v)for(C=p,y=p-1;y>=0;--y){var E=f.intersectsWithObject(this._objects[y])||f.isContainedWithinObject(this._objects[y])||this._objects[y].isContainedWithinObject(f);if(E){C=y;break}}else C=p-1;return C},bringForward:function(f,p){if(!f)return this;var v=this._activeObject,C,y,E,w,I,S=0;if(f===v&&f.type==="activeSelection")for(I=v._objects,C=I.length;C--;)y=I[C],E=this._objects.indexOf(y),E"}}),c(t.StaticCanvas.prototype,t.Observable),c(t.StaticCanvas.prototype,t.Collection),c(t.StaticCanvas.prototype,t.DataURLExporter),c(t.StaticCanvas,{EMPTY_JSON:'{"objects": [], "background": "white"}',supports:function(f){var p=u();if(!p||!p.getContext)return null;var v=p.getContext("2d");if(!v)return null;switch(f){case"setLineDash":return typeof v.setLineDash<"u";default:return null}}}),t.StaticCanvas.prototype.toJSON=t.StaticCanvas.prototype.toObject,t.isLikelyNode&&(t.StaticCanvas.prototype.createPNGStream=function(){var f=s(this.lowerCanvasEl);return f&&f.createPNGStream()},t.StaticCanvas.prototype.createJPEGStream=function(f){var p=s(this.lowerCanvasEl);return p&&p.createJPEGStream(f)})}(),t.BaseBrush=t.util.createClass({color:"rgb(0, 0, 0)",width:1,shadow:null,strokeLineCap:"round",strokeLineJoin:"round",strokeMiterLimit:10,strokeDashArray:null,limitedToCanvasSize:!1,_setBrushStyles:function(c){c.strokeStyle=this.color,c.lineWidth=this.width,c.lineCap=this.strokeLineCap,c.miterLimit=this.strokeMiterLimit,c.lineJoin=this.strokeLineJoin,c.setLineDash(this.strokeDashArray||[])},_saveAndTransform:function(c){var i=this.canvas.viewportTransform;c.save(),c.transform(i[0],i[1],i[2],i[3],i[4],i[5])},_setShadow:function(){if(this.shadow){var c=this.canvas,i=this.shadow,h=c.contextTop,d=c.getZoom();c&&c._isRetinaScaling()&&(d*=t.devicePixelRatio),h.shadowColor=i.color,h.shadowBlur=i.blur*d,h.shadowOffsetX=i.offsetX*d,h.shadowOffsetY=i.offsetY*d}},needsFullRender:function(){var c=new t.Color(this.color);return c.getAlpha()<1||!!this.shadow},_resetShadow:function(){var c=this.canvas.contextTop;c.shadowColor="",c.shadowBlur=c.shadowOffsetX=c.shadowOffsetY=0},_isOutSideCanvas:function(c){return c.x<0||c.x>this.canvas.getWidth()||c.y<0||c.y>this.canvas.getHeight()}}),function(){t.PencilBrush=t.util.createClass(t.BaseBrush,{decimate:.4,drawStraightLine:!1,straightLineKey:"shiftKey",initialize:function(c){this.canvas=c,this._points=[]},needsFullRender:function(){return this.callSuper("needsFullRender")||this._hasStraightLine},_drawSegment:function(c,i,h){var d=i.midPointFrom(h);return c.quadraticCurveTo(i.x,i.y,d.x,d.y),d},onMouseDown:function(c,i){this.canvas._isMainEvent(i.e)&&(this.drawStraightLine=i.e[this.straightLineKey],this._prepareForDrawing(c),this._captureDrawingPath(c),this._render())},onMouseMove:function(c,i){if(this.canvas._isMainEvent(i.e)&&(this.drawStraightLine=i.e[this.straightLineKey],!(this.limitedToCanvasSize===!0&&this._isOutSideCanvas(c))&&this._captureDrawingPath(c)&&this._points.length>1))if(this.needsFullRender())this.canvas.clearContext(this.canvas.contextTop),this._render();else{var h=this._points,d=h.length,a=this.canvas.contextTop;this._saveAndTransform(a),this.oldEnd&&(a.beginPath(),a.moveTo(this.oldEnd.x,this.oldEnd.y)),this.oldEnd=this._drawSegment(a,h[d-2],h[d-1],!0),a.stroke(),a.restore()}},onMouseUp:function(c){return this.canvas._isMainEvent(c.e)?(this.drawStraightLine=!1,this.oldEnd=void 0,this._finalizeAndAddPath(),!1):!0},_prepareForDrawing:function(c){var i=new t.Point(c.x,c.y);this._reset(),this._addPoint(i),this.canvas.contextTop.moveTo(i.x,i.y)},_addPoint:function(c){return this._points.length>1&&c.eq(this._points[this._points.length-1])?!1:(this.drawStraightLine&&this._points.length>1&&(this._hasStraightLine=!0,this._points.pop()),this._points.push(c),!0)},_reset:function(){this._points=[],this._setBrushStyles(this.canvas.contextTop),this._setShadow(),this._hasStraightLine=!1},_captureDrawingPath:function(c){var i=new t.Point(c.x,c.y);return this._addPoint(i)},_render:function(c){var i,h,d=this._points[0],a=this._points[1];if(c=c||this.canvas.contextTop,this._saveAndTransform(c),c.beginPath(),this._points.length===2&&d.x===a.x&&d.y===a.y){var o=this.width/1e3;d=new t.Point(d.x,d.y),a=new t.Point(a.x,a.y),d.x-=o,a.x+=o}for(c.moveTo(d.x,d.y),i=1,h=this._points.length;i=d&&(s=c[a],u.push(s));return u.push(c[o]),u},_finalizeAndAddPath:function(){var c=this.canvas.contextTop;c.closePath(),this.decimate&&(this._points=this.decimatePoints(this._points,this.decimate));var i=this.convertPointsToSVGPath(this._points);if(this._isEmptySVGPath(i)){this.canvas.requestRenderAll();return}var h=this.createPath(i);this.canvas.clearContext(this.canvas.contextTop),this.canvas.fire("before:path:created",{path:h}),this.canvas.add(h),this.canvas.requestRenderAll(),h.setCoords(),this._resetShadow(),this.canvas.fire("path:created",{path:h})}})}(),t.CircleBrush=t.util.createClass(t.BaseBrush,{width:10,initialize:function(c){this.canvas=c,this.points=[]},drawDot:function(c){var i=this.addPoint(c),h=this.canvas.contextTop;this._saveAndTransform(h),this.dot(h,i),h.restore()},dot:function(c,i){c.fillStyle=i.fill,c.beginPath(),c.arc(i.x,i.y,i.radius,0,Math.PI*2,!1),c.closePath(),c.fill()},onMouseDown:function(c){this.points.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.drawDot(c)},_render:function(){var c=this.canvas.contextTop,i,h,d=this.points;for(this._saveAndTransform(c),i=0,h=d.length;i0&&!this.preserveObjectStacking){s=[],u=[];for(var g=0,f=this._objects.length;g1&&(this._activeObject._objects=u),s.push.apply(s,u)}else s=this._objects;return s},renderAll:function(){this.contextTopDirty&&!this._groupSelector&&!this.isDrawingMode&&(this.clearContext(this.contextTop),this.contextTopDirty=!1),this.hasLostContext&&(this.renderTopLayer(this.contextTop),this.hasLostContext=!1);var a=this.contextContainer;return this.renderCanvas(a,this._chooseObjectsToRender()),this},renderTopLayer:function(a){a.save(),this.isDrawingMode&&this._isCurrentlyDrawing&&(this.freeDrawingBrush&&this.freeDrawingBrush._render(),this.contextTopDirty=!0),this.selection&&this._groupSelector&&(this._drawSelection(a),this.contextTopDirty=!0),a.restore()},renderTop:function(){var a=this.contextTop;return this.clearContext(a),this.renderTopLayer(a),this.fire("after:render"),this},_normalizePointer:function(a,o){var s=a.calcTransformMatrix(),u=t.util.invertTransform(s),g=this.restorePointerVpt(o);return t.util.transformPoint(g,u)},isTargetTransparent:function(a,o,s){if(a.shouldCache()&&a._cacheCanvas&&a!==this._activeObject){var u=this._normalizePointer(a,{x:o,y:s}),g=Math.max(a.cacheTranslationX+u.x*a.zoomX,0),f=Math.max(a.cacheTranslationY+u.y*a.zoomY,0),y=t.util.isTransparent(a._cacheContext,Math.round(g),Math.round(f),this.targetFindTolerance);return y}var p=this.contextCache,v=a.selectionBackgroundColor,C=this.viewportTransform;a.selectionBackgroundColor="",this.clearContext(p),p.save(),p.transform(C[0],C[1],C[2],C[3],C[4],C[5]),a.render(p),p.restore(),a.selectionBackgroundColor=v;var y=t.util.isTransparent(p,o,s,this.targetFindTolerance);return y},_isSelectionKeyPressed:function(a){var o=!1;return Array.isArray(this.selectionKey)?o=!!this.selectionKey.find(function(s){return a[s]===!0}):o=a[this.selectionKey],o},_shouldClearSelection:function(a,o){var s=this.getActiveObjects(),u=this._activeObject;return!o||o&&u&&s.length>1&&s.indexOf(o)===-1&&u!==o&&!this._isSelectionKeyPressed(a)||o&&!o.evented||o&&!o.selectable&&u&&u!==o},_shouldCenterTransform:function(a,o,s){if(a){var u;return o==="scale"||o==="scaleX"||o==="scaleY"||o==="resizing"?u=this.centeredScaling||a.centeredScaling:o==="rotate"&&(u=this.centeredRotation||a.centeredRotation),u?!s:s}},_getOriginFromCorner:function(a,o){var s={x:a.originX,y:a.originY};return o==="ml"||o==="tl"||o==="bl"?s.x="right":(o==="mr"||o==="tr"||o==="br")&&(s.x="left"),o==="tl"||o==="mt"||o==="tr"?s.y="bottom":(o==="bl"||o==="mb"||o==="br")&&(s.y="top"),s},_getActionFromCorner:function(a,o,s,u){if(!o||!a)return"drag";var g=u.controls[o];return g.getActionName(s,g,u)},_setupCurrentTransform:function(a,o,s){if(o){var u=this.getPointer(a),g=o.__corner,f=o.controls[g],p=s&&g?f.getActionHandler(a,o,f):t.controlsUtils.dragHandler,v=this._getActionFromCorner(s,g,a,o),C=this._getOriginFromCorner(o,g),y=a[this.centeredKey],E={target:o,action:v,actionHandler:p,corner:g,scaleX:o.scaleX,scaleY:o.scaleY,skewX:o.skewX,skewY:o.skewY,offsetX:u.x-o.left,offsetY:u.y-o.top,originX:C.x,originY:C.y,ex:u.x,ey:u.y,lastX:u.x,lastY:u.y,theta:i(o.angle),width:o.width*o.scaleX,shiftKey:a.shiftKey,altKey:y,original:t.util.saveObjectTransform(o)};this._shouldCenterTransform(o,v,y)&&(E.originX="center",E.originY="center"),E.original.originX=C.x,E.original.originY=C.y,this._currentTransform=E,this._beforeTransform(a)}},setCursor:function(a){this.upperCanvasEl.style.cursor=a},_drawSelection:function(a){var o=this._groupSelector,s=new t.Point(o.ex,o.ey),u=t.util.transformPoint(s,this.viewportTransform),g=new t.Point(o.ex+o.left,o.ey+o.top),f=t.util.transformPoint(g,this.viewportTransform),p=Math.min(u.x,f.x),v=Math.min(u.y,f.y),C=Math.max(u.x,f.x),y=Math.max(u.y,f.y),E=this.selectionLineWidth/2;this.selectionColor&&(a.fillStyle=this.selectionColor,a.fillRect(p,v,C-p,y-v)),!(!this.selectionLineWidth||!this.selectionBorderColor)&&(a.lineWidth=this.selectionLineWidth,a.strokeStyle=this.selectionBorderColor,p+=E,v+=E,C-=E,y-=E,t.Object.prototype._setLineDash.call(this,a,this.selectionDashArray),a.strokeRect(p,v,C-p,y-v))},findTarget:function(a,o){if(!this.skipTargetFind){var s=!0,u=this.getPointer(a,s),g=this._activeObject,f=this.getActiveObjects(),p,v,C=h(a),y=f.length>1&&!o||f.length===1;if(this.targets=[],y&&g._findTargetCorner(u,C)||f.length>1&&!o&&g===this._searchPossibleTargets([g],u))return g;if(f.length===1&&g===this._searchPossibleTargets([g],u))if(this.preserveObjectStacking)p=g,v=this.targets,this.targets=[];else return g;var E=this._searchPossibleTargets(this._objects,u);return a[this.altSelectionKey]&&E&&p&&E!==p&&(E=p,this.targets=v),E}},_checkTarget:function(a,o,s){if(o&&o.visible&&o.evented&&o.containsPoint(a))if((this.perPixelTargetFind||o.perPixelTargetFind)&&!o.isEditing){var u=this.isTargetTransparent(o,s.x,s.y);if(!u)return!0}else return!0},_searchPossibleTargets:function(a,o){for(var s,u=a.length,g;u--;){var f=a[u],p=f.group?this._normalizePointer(f.group,o):o;if(this._checkTarget(p,f,o)){s=a[u],s.subTargetCheck&&s instanceof t.Group&&(g=this._searchPossibleTargets(s._objects,o),g&&this.targets.push(g));break}}return s},restorePointerVpt:function(a){return t.util.transformPoint(a,t.util.invertTransform(this.viewportTransform))},getPointer:function(a,o){if(this._absolutePointer&&!o)return this._absolutePointer;if(this._pointer&&o)return this._pointer;var s=c(a),u=this.upperCanvasEl,g=u.getBoundingClientRect(),f=g.width||0,p=g.height||0,v;(!f||!p)&&("top"in g&&"bottom"in g&&(p=Math.abs(g.top-g.bottom)),"right"in g&&"left"in g&&(f=Math.abs(g.right-g.left))),this.calcOffset(),s.x=s.x-this._offset.left,s.y=s.y-this._offset.top,o||(s=this.restorePointerVpt(s));var C=this.getRetinaScaling();return C!==1&&(s.x/=C,s.y/=C),f===0||p===0?v={width:1,height:1}:v={width:u.width/f,height:u.height/p},{x:s.x*v.width,y:s.y*v.height}},_createUpperCanvas:function(){var a=this.lowerCanvasEl.className.replace(/\s*lower-canvas\s*/,""),o=this.lowerCanvasEl,s=this.upperCanvasEl;s?s.className="":(s=this._createCanvasElement(),this.upperCanvasEl=s),t.util.addClass(s,"upper-canvas "+a),this.wrapperEl.appendChild(s),this._copyCanvasStyle(o,s),this._applyCanvasStyle(s),this.contextTop=s.getContext("2d")},getTopContext:function(){return this.contextTop},_createCacheCanvas:function(){this.cacheCanvasEl=this._createCanvasElement(),this.cacheCanvasEl.setAttribute("width",this.width),this.cacheCanvasEl.setAttribute("height",this.height),this.contextCache=this.cacheCanvasEl.getContext("2d")},_initWrapperElement:function(){this.wrapperEl=t.util.wrapElement(this.lowerCanvasEl,"div",{class:this.containerClass}),t.util.setStyle(this.wrapperEl,{width:this.width+"px",height:this.height+"px",position:"relative"}),t.util.makeElementUnselectable(this.wrapperEl)},_applyCanvasStyle:function(a){var o=this.width||a.width,s=this.height||a.height;t.util.setStyle(a,{position:"absolute",width:o+"px",height:s+"px",left:0,top:0,"touch-action":this.allowTouchScrolling?"manipulation":"none","-ms-touch-action":this.allowTouchScrolling?"manipulation":"none"}),a.width=o,a.height=s,t.util.makeElementUnselectable(a)},_copyCanvasStyle:function(a,o){o.style.cssText=a.style.cssText},getSelectionContext:function(){return this.contextTop},getSelectionElement:function(){return this.upperCanvasEl},getActiveObject:function(){return this._activeObject},getActiveObjects:function(){var a=this._activeObject;return a?a.type==="activeSelection"&&a._objects?a._objects.slice(0):[a]:[]},_onObjectRemoved:function(a){a===this._activeObject&&(this.fire("before:selection:cleared",{target:a}),this._discardActiveObject(),this.fire("selection:cleared",{target:a}),a.fire("deselected")),a===this._hoveredTarget&&(this._hoveredTarget=null,this._hoveredTargets=[]),this.callSuper("_onObjectRemoved",a)},_fireSelectionEvents:function(a,o){var s=!1,u=this.getActiveObjects(),g=[],f=[];a.forEach(function(p){u.indexOf(p)===-1&&(s=!0,p.fire("deselected",{e:o,target:p}),f.push(p))}),u.forEach(function(p){a.indexOf(p)===-1&&(s=!0,p.fire("selected",{e:o,target:p}),g.push(p))}),a.length>0&&u.length>0?s&&this.fire("selection:updated",{e:o,selected:g,deselected:f}):u.length>0?this.fire("selection:created",{e:o,selected:g}):a.length>0&&this.fire("selection:cleared",{e:o,deselected:f})},setActiveObject:function(a,o){var s=this.getActiveObjects();return this._setActiveObject(a,o),this._fireSelectionEvents(s,o),this},_setActiveObject:function(a,o){return this._activeObject===a||!this._discardActiveObject(o,a)||a.onSelect({e:o})?!1:(this._activeObject=a,!0)},_discardActiveObject:function(a,o){var s=this._activeObject;if(s){if(s.onDeselect({e:a,object:o}))return!1;this._activeObject=null}return!0},discardActiveObject:function(a){var o=this.getActiveObjects(),s=this.getActiveObject();return o.length&&this.fire("before:selection:cleared",{target:s,e:a}),this._discardActiveObject(a),this._fireSelectionEvents(o,a),this},dispose:function(){var a=this.wrapperEl;return this.removeListeners(),a.removeChild(this.upperCanvasEl),a.removeChild(this.lowerCanvasEl),this.contextCache=null,this.contextTop=null,["upperCanvasEl","cacheCanvasEl"].forEach(function(o){t.util.cleanUpJsdomNode(this[o]),this[o]=void 0}.bind(this)),a.parentNode&&a.parentNode.replaceChild(this.lowerCanvasEl,this.wrapperEl),delete this.wrapperEl,t.StaticCanvas.prototype.dispose.call(this),this},clear:function(){return this.discardActiveObject(),this.clearContext(this.contextTop),this.callSuper("clear")},drawControls:function(a){var o=this._activeObject;o&&o._renderControls(a)},_toObject:function(a,o,s){var u=this._realizeGroupTransformOnObject(a),g=this.callSuper("_toObject",a,o,s);return this._unwindGroupTransformOnObject(a,u),g},_realizeGroupTransformOnObject:function(a){if(a.group&&a.group.type==="activeSelection"&&this._activeObject===a.group){var o=["angle","flipX","flipY","left","scaleX","scaleY","skewX","skewY","top"],s={};return o.forEach(function(u){s[u]=a[u]}),t.util.addTransformToObject(a,this._activeObject.calcOwnMatrix()),s}else return null},_unwindGroupTransformOnObject:function(a,o){o&&a.set(o)},_setSVGObject:function(a,o,s){var u=this._realizeGroupTransformOnObject(o);this.callSuper("_setSVGObject",a,o,s),this._unwindGroupTransformOnObject(o,u)},setViewportTransform:function(a){this.renderOnAddRemove&&this._activeObject&&this._activeObject.isEditing&&this._activeObject.clearContextTop(),t.StaticCanvas.prototype.setViewportTransform.call(this,a)}});for(var d in t.StaticCanvas)d!=="prototype"&&(t.Canvas[d]=t.StaticCanvas[d])}(),function(){var c=t.util.addListener,i=t.util.removeListener,h=3,d=2,a=1,o={passive:!1};function s(u,g){return u.button&&u.button===g-1}t.util.object.extend(t.Canvas.prototype,{mainTouchId:null,_initEventListeners:function(){this.removeListeners(),this._bindEvents(),this.addOrRemove(c,"add")},_getEventPrefix:function(){return this.enablePointerEvents?"pointer":"mouse"},addOrRemove:function(u,g){var f=this.upperCanvasEl,p=this._getEventPrefix();u(t.window,"resize",this._onResize),u(f,p+"down",this._onMouseDown),u(f,p+"move",this._onMouseMove,o),u(f,p+"out",this._onMouseOut),u(f,p+"enter",this._onMouseEnter),u(f,"wheel",this._onMouseWheel),u(f,"contextmenu",this._onContextMenu),u(f,"dblclick",this._onDoubleClick),u(f,"dragover",this._onDragOver),u(f,"dragenter",this._onDragEnter),u(f,"dragleave",this._onDragLeave),u(f,"drop",this._onDrop),this.enablePointerEvents||u(f,"touchstart",this._onTouchStart,o),typeof eventjs<"u"&&g in eventjs&&(eventjs[g](f,"gesture",this._onGesture),eventjs[g](f,"drag",this._onDrag),eventjs[g](f,"orientation",this._onOrientationChange),eventjs[g](f,"shake",this._onShake),eventjs[g](f,"longpress",this._onLongPress))},removeListeners:function(){this.addOrRemove(i,"remove");var u=this._getEventPrefix();i(t.document,u+"up",this._onMouseUp),i(t.document,"touchend",this._onTouchEnd,o),i(t.document,u+"move",this._onMouseMove,o),i(t.document,"touchmove",this._onMouseMove,o)},_bindEvents:function(){this.eventsBound||(this._onMouseDown=this._onMouseDown.bind(this),this._onTouchStart=this._onTouchStart.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onResize=this._onResize.bind(this),this._onGesture=this._onGesture.bind(this),this._onDrag=this._onDrag.bind(this),this._onShake=this._onShake.bind(this),this._onLongPress=this._onLongPress.bind(this),this._onOrientationChange=this._onOrientationChange.bind(this),this._onMouseWheel=this._onMouseWheel.bind(this),this._onMouseOut=this._onMouseOut.bind(this),this._onMouseEnter=this._onMouseEnter.bind(this),this._onContextMenu=this._onContextMenu.bind(this),this._onDoubleClick=this._onDoubleClick.bind(this),this._onDragOver=this._onDragOver.bind(this),this._onDragEnter=this._simpleEventHandler.bind(this,"dragenter"),this._onDragLeave=this._simpleEventHandler.bind(this,"dragleave"),this._onDrop=this._onDrop.bind(this),this.eventsBound=!0)},_onGesture:function(u,g){this.__onTransformGesture&&this.__onTransformGesture(u,g)},_onDrag:function(u,g){this.__onDrag&&this.__onDrag(u,g)},_onMouseWheel:function(u){this.__onMouseWheel(u)},_onMouseOut:function(u){var g=this._hoveredTarget;this.fire("mouse:out",{target:g,e:u}),this._hoveredTarget=null,g&&g.fire("mouseout",{e:u});var f=this;this._hoveredTargets.forEach(function(p){f.fire("mouse:out",{target:g,e:u}),p&&g.fire("mouseout",{e:u})}),this._hoveredTargets=[]},_onMouseEnter:function(u){!this._currentTransform&&!this.findTarget(u)&&(this.fire("mouse:over",{target:null,e:u}),this._hoveredTarget=null,this._hoveredTargets=[])},_onOrientationChange:function(u,g){this.__onOrientationChange&&this.__onOrientationChange(u,g)},_onShake:function(u,g){this.__onShake&&this.__onShake(u,g)},_onLongPress:function(u,g){this.__onLongPress&&this.__onLongPress(u,g)},_onDragOver:function(u){u.preventDefault();var g=this._simpleEventHandler("dragover",u);this._fireEnterLeaveEvents(g,u)},_onDrop:function(u){return this._simpleEventHandler("drop:before",u),this._simpleEventHandler("drop",u)},_onContextMenu:function(u){return this.stopContextMenu&&(u.stopPropagation(),u.preventDefault()),!1},_onDoubleClick:function(u){this._cacheTransformEventData(u),this._handleEvent(u,"dblclick"),this._resetTransformEventData(u)},getPointerId:function(u){var g=u.changedTouches;return g?g[0]&&g[0].identifier:this.enablePointerEvents?u.pointerId:-1},_isMainEvent:function(u){return u.isPrimary===!0?!0:u.isPrimary===!1?!1:u.type==="touchend"&&u.touches.length===0?!0:u.changedTouches?u.changedTouches[0].identifier===this.mainTouchId:!0},_onTouchStart:function(u){u.preventDefault(),this.mainTouchId===null&&(this.mainTouchId=this.getPointerId(u)),this.__onMouseDown(u),this._resetTransformEventData();var g=this.upperCanvasEl,f=this._getEventPrefix();c(t.document,"touchend",this._onTouchEnd,o),c(t.document,"touchmove",this._onMouseMove,o),i(g,f+"down",this._onMouseDown)},_onMouseDown:function(u){this.__onMouseDown(u),this._resetTransformEventData();var g=this.upperCanvasEl,f=this._getEventPrefix();i(g,f+"move",this._onMouseMove,o),c(t.document,f+"up",this._onMouseUp),c(t.document,f+"move",this._onMouseMove,o)},_onTouchEnd:function(u){if(!(u.touches.length>0)){this.__onMouseUp(u),this._resetTransformEventData(),this.mainTouchId=null;var g=this._getEventPrefix();i(t.document,"touchend",this._onTouchEnd,o),i(t.document,"touchmove",this._onMouseMove,o);var f=this;this._willAddMouseDown&&clearTimeout(this._willAddMouseDown),this._willAddMouseDown=setTimeout(function(){c(f.upperCanvasEl,g+"down",f._onMouseDown),f._willAddMouseDown=0},400)}},_onMouseUp:function(u){this.__onMouseUp(u),this._resetTransformEventData();var g=this.upperCanvasEl,f=this._getEventPrefix();this._isMainEvent(u)&&(i(t.document,f+"up",this._onMouseUp),i(t.document,f+"move",this._onMouseMove,o),c(g,f+"move",this._onMouseMove,o))},_onMouseMove:function(u){!this.allowTouchScrolling&&u.preventDefault&&u.preventDefault(),this.__onMouseMove(u)},_onResize:function(){this.calcOffset()},_shouldRender:function(u){var g=this._activeObject;return!!g!=!!u||g&&u&&g!==u?!0:(g&&g.isEditing,!1)},__onMouseUp:function(u){var g,f=this._currentTransform,p=this._groupSelector,v=!1,C=!p||p.left===0&&p.top===0;if(this._cacheTransformEventData(u),g=this._target,this._handleEvent(u,"up:before"),s(u,h)){this.fireRightClick&&this._handleEvent(u,"up",h,C);return}if(s(u,d)){this.fireMiddleClick&&this._handleEvent(u,"up",d,C),this._resetTransformEventData();return}if(this.isDrawingMode&&this._isCurrentlyDrawing){this._onMouseUpInDrawingMode(u);return}if(this._isMainEvent(u)){if(f&&(this._finalizeCurrentTransform(u),v=f.actionPerformed),!C){var y=g===this._activeObject;this._maybeGroupObjects(u),v||(v=this._shouldRender(g)||!y&&g===this._activeObject)}var E,w;if(g){if(E=g._findTargetCorner(this.getPointer(u,!0),t.util.isTouchEvent(u)),g.selectable&&g!==this._activeObject&&g.activeOn==="up")this.setActiveObject(g,u),v=!0;else{var I=g.controls[E],S=I&&I.getMouseUpHandler(u,g,I);S&&(w=this.getPointer(u),S(u,f,w.x,w.y))}g.isMoving=!1}if(f&&(f.target!==g||f.corner!==E)){var D=f.target&&f.target.controls[f.corner],R=D&&D.getMouseUpHandler(u,g,I);w=w||this.getPointer(u),R&&R(u,f,w.x,w.y)}this._setCursorFromEvent(u,g),this._handleEvent(u,"up",a,C),this._groupSelector=null,this._currentTransform=null,g&&(g.__corner=0),v?this.requestRenderAll():C||this.renderTop()}},_simpleEventHandler:function(u,g){var f=this.findTarget(g),p=this.targets,v={e:g,target:f,subTargets:p};if(this.fire(u,v),f&&f.fire(u,v),!p)return f;for(var C=0;C1&&(a=new t.ActiveSelection(d.reverse(),{canvas:this}),this.setActiveObject(a,h))},_collectObjects:function(h){for(var d=[],a,o=this._groupSelector.ex,s=this._groupSelector.ey,u=o+this._groupSelector.left,g=s+this._groupSelector.top,f=new t.Point(c(o,u),c(s,g)),p=new t.Point(i(o,u),i(s,g)),v=!this.selectionFullyContained,C=o===u&&s===g,y=this._objects.length;y--&&(a=this._objects[y],!(!(!a||!a.selectable||!a.visible)&&(v&&a.intersectsWithRect(f,p,!0)||a.isContainedWithinRect(f,p,!0)||v&&a.containsPoint(f,null,!0)||v&&a.containsPoint(p,null,!0))&&(d.push(a),C))););return d.length>1&&(d=d.filter(function(E){return!E.onSelect({e:h})})),d},_maybeGroupObjects:function(h){this.selection&&this._groupSelector&&this._groupSelectedObjects(h),this.setCursor(this.defaultCursor),this._groupSelector=null}})}(),function(){t.util.object.extend(t.StaticCanvas.prototype,{toDataURL:function(c){c||(c={});var i=c.format||"png",h=c.quality||1,d=(c.multiplier||1)*(c.enableRetinaScaling?this.getRetinaScaling():1),a=this.toCanvasElement(d,c);return t.util.toDataURL(a,i,h)},toCanvasElement:function(c,i){c=c||1,i=i||{};var h=(i.width||this.width)*c,d=(i.height||this.height)*c,a=this.getZoom(),o=this.width,s=this.height,u=a*c,g=this.viewportTransform,f=(g[4]-(i.left||0))*c,p=(g[5]-(i.top||0))*c,v=this.interactive,C=[u,0,0,u,f,p],y=this.enableRetinaScaling,E=t.util.createCanvasElement(),w=this.contextTop;return E.width=h,E.height=d,this.contextTop=null,this.enableRetinaScaling=!1,this.interactive=!1,this.viewportTransform=C,this.width=h,this.height=d,this.calcViewportBoundaries(),this.renderCanvas(E.getContext("2d"),this._objects),this.viewportTransform=g,this.width=o,this.height=s,this.calcViewportBoundaries(),this.interactive=v,this.enableRetinaScaling=y,this.contextTop=w,E}})}(),t.util.object.extend(t.StaticCanvas.prototype,{loadFromJSON:function(c,i,h){if(c){var d=typeof c=="string"?JSON.parse(c):t.util.object.clone(c),a=this,o=d.clipPath,s=this.renderOnAddRemove;return this.renderOnAddRemove=!1,delete d.clipPath,this._enlivenObjects(d.objects,function(u){a.clear(),a._setBgOverlay(d,function(){o?a._enlivenObjects([o],function(g){a.clipPath=g[0],a.__setupCanvas.call(a,d,u,s,i)}):a.__setupCanvas.call(a,d,u,s,i)})},h),this}},__setupCanvas:function(c,i,h,d){var a=this;i.forEach(function(o,s){a.insertAt(o,s)}),this.renderOnAddRemove=h,delete c.objects,delete c.backgroundImage,delete c.overlayImage,delete c.background,delete c.overlay,this._setOptions(c),this.renderAll(),d&&d()},_setBgOverlay:function(c,i){var h={backgroundColor:!1,overlayColor:!1,backgroundImage:!1,overlayImage:!1};if(!c.backgroundImage&&!c.overlayImage&&!c.background&&!c.overlay){i&&i();return}var d=function(){h.backgroundImage&&h.overlayImage&&h.backgroundColor&&h.overlayColor&&i&&i()};this.__setBgOverlay("backgroundImage",c.backgroundImage,h,d),this.__setBgOverlay("overlayImage",c.overlayImage,h,d),this.__setBgOverlay("backgroundColor",c.background,h,d),this.__setBgOverlay("overlayColor",c.overlay,h,d)},__setBgOverlay:function(c,i,h,d){var a=this;if(!i){h[c]=!0,d&&d();return}c==="backgroundImage"||c==="overlayImage"?t.util.enlivenObjects([i],function(o){a[c]=o[0],h[c]=!0,d&&d()}):this["set"+t.util.string.capitalize(c,!0)](i,function(){h[c]=!0,d&&d()})},_enlivenObjects:function(c,i,h){if(!c||c.length===0){i&&i([]);return}t.util.enlivenObjects(c,function(d){i&&i(d)},null,h)},_toDataURL:function(c,i){this.clone(function(h){i(h.toDataURL(c))})},_toDataURLWithMultiplier:function(c,i,h){this.clone(function(d){h(d.toDataURLWithMultiplier(c,i))})},clone:function(c,i){var h=JSON.stringify(this.toJSON(i));this.cloneWithoutData(function(d){d.loadFromJSON(h,function(){c&&c(d)})})},cloneWithoutData:function(c){var i=t.util.createCanvasElement();i.width=this.width,i.height=this.height;var h=new t.Canvas(i);this.backgroundImage?(h.setBackgroundImage(this.backgroundImage.src,function(){h.renderAll(),c&&c(h)}),h.backgroundImageOpacity=this.backgroundImageOpacity,h.backgroundImageStretch=this.backgroundImageStretch):c&&c(h)}}),function(c){var i=c.fabric||(c.fabric={}),h=i.util.object.extend,d=i.util.object.clone,a=i.util.toFixed,o=i.util.string.capitalize,s=i.util.degreesToRadians,u=!i.isLikelyNode,g=2;i.Object||(i.Object=i.util.createClass(i.CommonMethods,{type:"object",originX:"left",originY:"top",top:0,left:0,width:0,height:0,scaleX:1,scaleY:1,flipX:!1,flipY:!1,opacity:1,angle:0,skewX:0,skewY:0,cornerSize:13,touchCornerSize:24,transparentCorners:!0,hoverCursor:null,moveCursor:null,padding:0,borderColor:"rgb(178,204,255)",borderDashArray:null,cornerColor:"rgb(178,204,255)",cornerStrokeColor:null,cornerStyle:"rect",cornerDashArray:null,centeredScaling:!1,centeredRotation:!0,fill:"rgb(0,0,0)",fillRule:"nonzero",globalCompositeOperation:"source-over",backgroundColor:"",selectionBackgroundColor:"",stroke:null,strokeWidth:1,strokeDashArray:null,strokeDashOffset:0,strokeLineCap:"butt",strokeLineJoin:"miter",strokeMiterLimit:4,shadow:null,borderOpacityWhenMoving:.4,borderScaleFactor:1,minScaleLimit:0,selectable:!0,evented:!0,visible:!0,hasControls:!0,hasBorders:!0,perPixelTargetFind:!1,includeDefaultValues:!0,lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,lockScalingFlip:!1,excludeFromExport:!1,objectCaching:u,statefullCache:!1,noScaleCache:!0,strokeUniform:!1,dirty:!0,__corner:0,paintFirst:"fill",activeOn:"down",stateProperties:"top left width height scaleX scaleY flipX flipY originX originY transformMatrix stroke strokeWidth strokeDashArray strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit angle opacity fill globalCompositeOperation shadow visible backgroundColor skewX skewY fillRule paintFirst clipPath strokeUniform".split(" "),cacheProperties:"fill stroke strokeWidth strokeDashArray width height paintFirst strokeUniform strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit backgroundColor clipPath".split(" "),colorProperties:"fill stroke backgroundColor".split(" "),clipPath:void 0,inverted:!1,absolutePositioned:!1,initialize:function(f){f&&this.setOptions(f)},_createCacheCanvas:function(){this._cacheProperties={},this._cacheCanvas=i.util.createCanvasElement(),this._cacheContext=this._cacheCanvas.getContext("2d"),this._updateCacheCanvas(),this.dirty=!0},_limitCacheSize:function(f){var p=i.perfLimitSizeTotal,v=f.width,C=f.height,y=i.maxCacheSideLimit,E=i.minCacheSideLimit;if(v<=y&&C<=y&&v*C<=p)return vD&&(f.zoomX/=v/D,f.width=D,f.capped=!0),C>R&&(f.zoomY/=C/R,f.height=R,f.capped=!0),f},_getCacheCanvasDimensions:function(){var f=this.getTotalObjectScaling(),p=this._getTransformedDimensions(0,0),v=p.x*f.scaleX/this.scaleX,C=p.y*f.scaleY/this.scaleY;return{width:v+g,height:C+g,zoomX:f.scaleX,zoomY:f.scaleY,x:v,y:C}},_updateCacheCanvas:function(){var f=this.canvas;if(this.noScaleCache&&f&&f._currentTransform){var p=f._currentTransform.target,v=f._currentTransform.action;if(this===p&&v.slice&&v.slice(0,5)==="scale")return!1}var C=this._cacheCanvas,y=this._limitCacheSize(this._getCacheCanvasDimensions()),E=i.minCacheSideLimit,w=y.width,I=y.height,S,D,R=y.zoomX,J=y.zoomY,ee=w!==this.cacheWidth||I!==this.cacheHeight,Z=this.zoomX!==R||this.zoomY!==J,te=ee||Z,re=0,oe=0,H=!1;if(ee){var L=this._cacheCanvas.width,B=this._cacheCanvas.height,b=w>L||I>B,Q=(wE&&B>E;H=b||Q,b&&!y.capped&&(w>E||I>E)&&(re=w*.1,oe=I*.1)}return this instanceof i.Text&&this.path&&(te=!0,H=!0,re+=this.getHeightOfLine(0)*this.zoomX,oe+=this.getHeightOfLine(0)*this.zoomY),te?(H?(C.width=Math.ceil(w+re),C.height=Math.ceil(I+oe)):(this._cacheContext.setTransform(1,0,0,1,0,0),this._cacheContext.clearRect(0,0,C.width,C.height)),S=y.x/2,D=y.y/2,this.cacheTranslationX=Math.round(C.width/2-S)+S,this.cacheTranslationY=Math.round(C.height/2-D)+D,this.cacheWidth=w,this.cacheHeight=I,this._cacheContext.translate(this.cacheTranslationX,this.cacheTranslationY),this._cacheContext.scale(R,J),this.zoomX=R,this.zoomY=J,!0):!1},setOptions:function(f){this._setOptions(f),this._initGradient(f.fill,"fill"),this._initGradient(f.stroke,"stroke"),this._initPattern(f.fill,"fill"),this._initPattern(f.stroke,"stroke")},transform:function(f){var p=this.group&&!this.group._transformDone||this.group&&this.canvas&&f===this.canvas.contextTop,v=this.calcTransformMatrix(!p);f.transform(v[0],v[1],v[2],v[3],v[4],v[5])},toObject:function(f){var p=i.Object.NUM_FRACTION_DIGITS,v={type:this.type,version:i.version,originX:this.originX,originY:this.originY,left:a(this.left,p),top:a(this.top,p),width:a(this.width,p),height:a(this.height,p),fill:this.fill&&this.fill.toObject?this.fill.toObject():this.fill,stroke:this.stroke&&this.stroke.toObject?this.stroke.toObject():this.stroke,strokeWidth:a(this.strokeWidth,p),strokeDashArray:this.strokeDashArray?this.strokeDashArray.concat():this.strokeDashArray,strokeLineCap:this.strokeLineCap,strokeDashOffset:this.strokeDashOffset,strokeLineJoin:this.strokeLineJoin,strokeUniform:this.strokeUniform,strokeMiterLimit:a(this.strokeMiterLimit,p),scaleX:a(this.scaleX,p),scaleY:a(this.scaleY,p),angle:a(this.angle,p),flipX:this.flipX,flipY:this.flipY,opacity:a(this.opacity,p),shadow:this.shadow&&this.shadow.toObject?this.shadow.toObject():this.shadow,visible:this.visible,backgroundColor:this.backgroundColor,fillRule:this.fillRule,paintFirst:this.paintFirst,globalCompositeOperation:this.globalCompositeOperation,skewX:a(this.skewX,p),skewY:a(this.skewY,p)};return this.clipPath&&!this.clipPath.excludeFromExport&&(v.clipPath=this.clipPath.toObject(f),v.clipPath.inverted=this.clipPath.inverted,v.clipPath.absolutePositioned=this.clipPath.absolutePositioned),i.util.populateWithProperties(this,v,f),this.includeDefaultValues||(v=this._removeDefaultValues(v)),v},toDatalessObject:function(f){return this.toObject(f)},_removeDefaultValues:function(f){var p=i.util.getKlass(f.type).prototype,v=p.stateProperties;return v.forEach(function(C){C==="left"||C==="top"||(f[C]===p[C]&&delete f[C],Array.isArray(f[C])&&Array.isArray(p[C])&&f[C].length===0&&p[C].length===0&&delete f[C])}),f},toString:function(){return"#"},getObjectScaling:function(){if(!this.group)return{scaleX:this.scaleX,scaleY:this.scaleY};var f=i.util.qrDecompose(this.calcTransformMatrix());return{scaleX:Math.abs(f.scaleX),scaleY:Math.abs(f.scaleY)}},getTotalObjectScaling:function(){var f=this.getObjectScaling(),p=f.scaleX,v=f.scaleY;if(this.canvas){var C=this.canvas.getZoom(),y=this.canvas.getRetinaScaling();p*=C*y,v*=C*y}return{scaleX:p,scaleY:v}},getObjectOpacity:function(){var f=this.opacity;return this.group&&(f*=this.group.getObjectOpacity()),f},_set:function(f,p){var v=f==="scaleX"||f==="scaleY",C=this[f]!==p,y=!1;return v&&(p=this._constrainScale(p)),f==="scaleX"&&p<0?(this.flipX=!this.flipX,p*=-1):f==="scaleY"&&p<0?(this.flipY=!this.flipY,p*=-1):f==="shadow"&&p&&!(p instanceof i.Shadow)?p=new i.Shadow(p):f==="dirty"&&this.group&&this.group.set("dirty",p),this[f]=p,C&&(y=this.group&&this.group.isOnACache(),this.cacheProperties.indexOf(f)>-1?(this.dirty=!0,y&&this.group.set("dirty",!0)):y&&this.stateProperties.indexOf(f)>-1&&this.group.set("dirty",!0)),this},setOnGroup:function(){},getViewportTransform:function(){return this.canvas&&this.canvas.viewportTransform?this.canvas.viewportTransform:i.iMatrix.concat()},isNotVisible:function(){return this.opacity===0||!this.width&&!this.height&&this.strokeWidth===0||!this.visible},render:function(f){this.isNotVisible()||this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(f.save(),this._setupCompositeOperation(f),this.drawSelectionBackground(f),this.transform(f),this._setOpacity(f),this._setShadow(f,this),this.shouldCache()?(this.renderCache(),this.drawCacheOnCanvas(f)):(this._removeCacheCanvas(),this.dirty=!1,this.drawObject(f),this.objectCaching&&this.statefullCache&&this.saveState({propertySet:"cacheProperties"})),f.restore())},renderCache:function(f){f=f||{},(!this._cacheCanvas||!this._cacheContext)&&this._createCacheCanvas(),this.isCacheDirty()&&(this.statefullCache&&this.saveState({propertySet:"cacheProperties"}),this.drawObject(this._cacheContext,f.forClipping),this.dirty=!1)},_removeCacheCanvas:function(){this._cacheCanvas=null,this._cacheContext=null,this.cacheWidth=0,this.cacheHeight=0},hasStroke:function(){return this.stroke&&this.stroke!=="transparent"&&this.strokeWidth!==0},hasFill:function(){return this.fill&&this.fill!=="transparent"},needsItsOwnCache:function(){return!!(this.paintFirst==="stroke"&&this.hasFill()&&this.hasStroke()&&typeof this.shadow=="object"||this.clipPath)},shouldCache:function(){return this.ownCaching=this.needsItsOwnCache()||this.objectCaching&&(!this.group||!this.group.isOnACache()),this.ownCaching},willDrawShadow:function(){return!!this.shadow&&(this.shadow.offsetX!==0||this.shadow.offsetY!==0)},drawClipPathOnCache:function(f,p){if(f.save(),p.inverted?f.globalCompositeOperation="destination-out":f.globalCompositeOperation="destination-in",p.absolutePositioned){var v=i.util.invertTransform(this.calcTransformMatrix());f.transform(v[0],v[1],v[2],v[3],v[4],v[5])}p.transform(f),f.scale(1/p.zoomX,1/p.zoomY),f.drawImage(p._cacheCanvas,-p.cacheTranslationX,-p.cacheTranslationY),f.restore()},drawObject:function(f,p){var v=this.fill,C=this.stroke;p?(this.fill="black",this.stroke="",this._setClippingProperties(f)):this._renderBackground(f),this._render(f),this._drawClipPath(f,this.clipPath),this.fill=v,this.stroke=C},_drawClipPath:function(f,p){p&&(p.canvas=this.canvas,p.shouldCache(),p._transformDone=!0,p.renderCache({forClipping:!0}),this.drawClipPathOnCache(f,p))},drawCacheOnCanvas:function(f){f.scale(1/this.zoomX,1/this.zoomY),f.drawImage(this._cacheCanvas,-this.cacheTranslationX,-this.cacheTranslationY)},isCacheDirty:function(f){if(this.isNotVisible())return!1;if(this._cacheCanvas&&this._cacheContext&&!f&&this._updateCacheCanvas())return!0;if(this.dirty||this.clipPath&&this.clipPath.absolutePositioned||this.statefullCache&&this.hasStateChanged("cacheProperties")){if(this._cacheCanvas&&this._cacheContext&&!f){var p=this.cacheWidth/this.zoomX,v=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-p/2,-v/2,p,v)}return!0}return!1},_renderBackground:function(f){if(this.backgroundColor){var p=this._getNonTransformedDimensions();f.fillStyle=this.backgroundColor,f.fillRect(-p.x/2,-p.y/2,p.x,p.y),this._removeShadow(f)}},_setOpacity:function(f){this.group&&!this.group._transformDone?f.globalAlpha=this.getObjectOpacity():f.globalAlpha*=this.opacity},_setStrokeStyles:function(f,p){var v=p.stroke;v&&(f.lineWidth=p.strokeWidth,f.lineCap=p.strokeLineCap,f.lineDashOffset=p.strokeDashOffset,f.lineJoin=p.strokeLineJoin,f.miterLimit=p.strokeMiterLimit,v.toLive?v.gradientUnits==="percentage"||v.gradientTransform||v.patternTransform?this._applyPatternForTransformedGradient(f,v):(f.strokeStyle=v.toLive(f,this),this._applyPatternGradientTransform(f,v)):f.strokeStyle=p.stroke)},_setFillStyles:function(f,p){var v=p.fill;v&&(v.toLive?(f.fillStyle=v.toLive(f,this),this._applyPatternGradientTransform(f,p.fill)):f.fillStyle=v)},_setClippingProperties:function(f){f.globalAlpha=1,f.strokeStyle="transparent",f.fillStyle="#000000"},_setLineDash:function(f,p){!p||p.length===0||(1&p.length&&p.push.apply(p,p),f.setLineDash(p))},_renderControls:function(f,p){var v=this.getViewportTransform(),C=this.calcTransformMatrix(),y,E,w;p=p||{},E=typeof p.hasBorders<"u"?p.hasBorders:this.hasBorders,w=typeof p.hasControls<"u"?p.hasControls:this.hasControls,C=i.util.multiplyTransformMatrices(v,C),y=i.util.qrDecompose(C),f.save(),f.translate(y.translateX,y.translateY),f.lineWidth=1*this.borderScaleFactor,this.group||(f.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1),this.flipX&&(y.angle-=180),f.rotate(s(this.group?y.angle:this.angle)),p.forActiveSelection||this.group?E&&this.drawBordersInGroup(f,y,p):E&&this.drawBorders(f,p),w&&this.drawControls(f,p),f.restore()},_setShadow:function(f){if(this.shadow){var p=this.shadow,v=this.canvas,C,y=v&&v.viewportTransform[0]||1,E=v&&v.viewportTransform[3]||1;p.nonScaling?C={scaleX:1,scaleY:1}:C=this.getObjectScaling(),v&&v._isRetinaScaling()&&(y*=i.devicePixelRatio,E*=i.devicePixelRatio),f.shadowColor=p.color,f.shadowBlur=p.blur*i.browserShadowBlurConstant*(y+E)*(C.scaleX+C.scaleY)/4,f.shadowOffsetX=p.offsetX*y*C.scaleX,f.shadowOffsetY=p.offsetY*E*C.scaleY}},_removeShadow:function(f){this.shadow&&(f.shadowColor="",f.shadowBlur=f.shadowOffsetX=f.shadowOffsetY=0)},_applyPatternGradientTransform:function(f,p){if(!p||!p.toLive)return{offsetX:0,offsetY:0};var v=p.gradientTransform||p.patternTransform,C=-this.width/2+p.offsetX||0,y=-this.height/2+p.offsetY||0;return p.gradientUnits==="percentage"?f.transform(this.width,0,0,this.height,C,y):f.transform(1,0,0,1,C,y),v&&f.transform(v[0],v[1],v[2],v[3],v[4],v[5]),{offsetX:C,offsetY:y}},_renderPaintInOrder:function(f){this.paintFirst==="stroke"?(this._renderStroke(f),this._renderFill(f)):(this._renderFill(f),this._renderStroke(f))},_render:function(){},_renderFill:function(f){this.fill&&(f.save(),this._setFillStyles(f,this),this.fillRule==="evenodd"?f.fill("evenodd"):f.fill(),f.restore())},_renderStroke:function(f){if(!(!this.stroke||this.strokeWidth===0)){if(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(f),f.save(),this.strokeUniform&&this.group){var p=this.getObjectScaling();f.scale(1/p.scaleX,1/p.scaleY)}else this.strokeUniform&&f.scale(1/this.scaleX,1/this.scaleY);this._setLineDash(f,this.strokeDashArray),this._setStrokeStyles(f,this),f.stroke(),f.restore()}},_applyPatternForTransformedGradient:function(f,p){var v=this._limitCacheSize(this._getCacheCanvasDimensions()),C=i.util.createCanvasElement(),y,E=this.canvas.getRetinaScaling(),w=v.x/this.scaleX/E,I=v.y/this.scaleY/E;C.width=w,C.height=I,y=C.getContext("2d"),y.beginPath(),y.moveTo(0,0),y.lineTo(w,0),y.lineTo(w,I),y.lineTo(0,I),y.closePath(),y.translate(w/2,I/2),y.scale(v.zoomX/this.scaleX/E,v.zoomY/this.scaleY/E),this._applyPatternGradientTransform(y,p),y.fillStyle=p.toLive(f),y.fill(),f.translate(-this.width/2-this.strokeWidth/2,-this.height/2-this.strokeWidth/2),f.scale(E*this.scaleX/v.zoomX,E*this.scaleY/v.zoomY),f.strokeStyle=y.createPattern(C,"no-repeat")},_findCenterFromElement:function(){return{x:this.left+this.width/2,y:this.top+this.height/2}},_assignTransformMatrixProps:function(){if(this.transformMatrix){var f=i.util.qrDecompose(this.transformMatrix);this.flipX=!1,this.flipY=!1,this.set("scaleX",f.scaleX),this.set("scaleY",f.scaleY),this.angle=f.angle,this.skewX=f.skewX,this.skewY=0}},_removeTransformMatrix:function(f){var p=this._findCenterFromElement();this.transformMatrix&&(this._assignTransformMatrixProps(),p=i.util.transformPoint(p,this.transformMatrix)),this.transformMatrix=null,f&&(this.scaleX*=f.scaleX,this.scaleY*=f.scaleY,this.cropX=f.cropX,this.cropY=f.cropY,p.x+=f.offsetLeft,p.y+=f.offsetTop,this.width=f.width,this.height=f.height),this.setPositionByOrigin(p,"center","center")},clone:function(f,p){var v=this.toObject(p);this.constructor.fromObject?this.constructor.fromObject(v,f):i.Object._fromObject("Object",v,f)},cloneAsImage:function(f,p){var v=this.toCanvasElement(p);return f&&f(new i.Image(v)),this},toCanvasElement:function(f){f||(f={});var p=i.util,v=p.saveObjectTransform(this),C=this.group,y=this.shadow,E=Math.abs,w=(f.multiplier||1)*(f.enableRetinaScaling?i.devicePixelRatio:1);delete this.group,f.withoutTransform&&p.resetObjectTransform(this),f.withoutShadow&&(this.shadow=null);var I=i.util.createCanvasElement(),S=this.getBoundingRect(!0,!0),D=this.shadow,R,J={x:0,y:0},ee,Z,te;D&&(ee=D.blur,D.nonScaling?R={scaleX:1,scaleY:1}:R=this.getObjectScaling(),J.x=2*Math.round(E(D.offsetX)+ee)*E(R.scaleX),J.y=2*Math.round(E(D.offsetY)+ee)*E(R.scaleY)),Z=S.width+J.x,te=S.height+J.y,I.width=Math.ceil(Z),I.height=Math.ceil(te);var re=new i.StaticCanvas(I,{enableRetinaScaling:!1,renderOnAddRemove:!1,skipOffscreen:!1});f.format==="jpeg"&&(re.backgroundColor="#fff"),this.setPositionByOrigin(new i.Point(re.width/2,re.height/2),"center","center");var oe=this.canvas;re.add(this);var H=re.toCanvasElement(w||1,f);return this.shadow=y,this.set("canvas",oe),C&&(this.group=C),this.set(v).setCoords(),re._objects=[],re.dispose(),re=null,H},toDataURL:function(f){return f||(f={}),i.util.toDataURL(this.toCanvasElement(f),f.format||"png",f.quality||1)},isType:function(f){return arguments.length>1?Array.from(arguments).includes(this.type):this.type===f},complexity:function(){return 1},toJSON:function(f){return this.toObject(f)},rotate:function(f){var p=(this.originX!=="center"||this.originY!=="center")&&this.centeredRotation;return p&&this._setOriginToCenter(),this.set("angle",f),p&&this._resetOrigin(),this},centerH:function(){return this.canvas&&this.canvas.centerObjectH(this),this},viewportCenterH:function(){return this.canvas&&this.canvas.viewportCenterObjectH(this),this},centerV:function(){return this.canvas&&this.canvas.centerObjectV(this),this},viewportCenterV:function(){return this.canvas&&this.canvas.viewportCenterObjectV(this),this},center:function(){return this.canvas&&this.canvas.centerObject(this),this},viewportCenter:function(){return this.canvas&&this.canvas.viewportCenterObject(this),this},getLocalPointer:function(f,p){p=p||this.canvas.getPointer(f);var v=new i.Point(p.x,p.y),C=this._getLeftTopCoords();return this.angle&&(v=i.util.rotatePoint(v,C,s(-this.angle))),{x:v.x-C.x,y:v.y-C.y}},_setupCompositeOperation:function(f){this.globalCompositeOperation&&(f.globalCompositeOperation=this.globalCompositeOperation)},dispose:function(){i.runningAnimations&&i.runningAnimations.cancelByTarget(this)}}),i.util.createAccessors&&i.util.createAccessors(i.Object),h(i.Object.prototype,i.Observable),i.Object.NUM_FRACTION_DIGITS=2,i.Object.ENLIVEN_PROPS=["clipPath"],i.Object._fromObject=function(f,p,v,C){var y=i[f];p=d(p,!0),i.util.enlivenPatterns([p.fill,p.stroke],function(E){typeof E[0]<"u"&&(p.fill=E[0]),typeof E[1]<"u"&&(p.stroke=E[1]),i.util.enlivenObjectEnlivables(p,p,function(){var w=C?new y(p[C],p):new y(p);v&&v(w)})})},i.Object.__uid=0)}(e),function(){var c=t.util.degreesToRadians,i={left:-.5,center:0,right:.5},h={top:-.5,center:0,bottom:.5};t.util.object.extend(t.Object.prototype,{translateToGivenOrigin:function(d,a,o,s,u){var g=d.x,f=d.y,p,v,C;return typeof a=="string"?a=i[a]:a-=.5,typeof s=="string"?s=i[s]:s-=.5,p=s-a,typeof o=="string"?o=h[o]:o-=.5,typeof u=="string"?u=h[u]:u-=.5,v=u-o,(p||v)&&(C=this._getTransformedDimensions(),g=d.x+p*C.x,f=d.y+v*C.y),new t.Point(g,f)},translateToCenterPoint:function(d,a,o){var s=this.translateToGivenOrigin(d,a,o,"center","center");return this.angle?t.util.rotatePoint(s,d,c(this.angle)):s},translateToOriginPoint:function(d,a,o){var s=this.translateToGivenOrigin(d,"center","center",a,o);return this.angle?t.util.rotatePoint(s,d,c(this.angle)):s},getCenterPoint:function(){var d=new t.Point(this.left,this.top);return this.translateToCenterPoint(d,this.originX,this.originY)},getPointByOrigin:function(d,a){var o=this.getCenterPoint();return this.translateToOriginPoint(o,d,a)},toLocalPoint:function(d,a,o){var s=this.getCenterPoint(),u,g;return typeof a<"u"&&typeof o<"u"?u=this.translateToGivenOrigin(s,"center","center",a,o):u=new t.Point(this.left,this.top),g=new t.Point(d.x,d.y),this.angle&&(g=t.util.rotatePoint(g,s,-c(this.angle))),g.subtractEquals(u)},setPositionByOrigin:function(d,a,o){var s=this.translateToCenterPoint(d,a,o),u=this.translateToOriginPoint(s,this.originX,this.originY);this.set("left",u.x),this.set("top",u.y)},adjustPosition:function(d){var a=c(this.angle),o=this.getScaledWidth(),s=t.util.cos(a)*o,u=t.util.sin(a)*o,g,f;typeof this.originX=="string"?g=i[this.originX]:g=this.originX-.5,typeof d=="string"?f=i[d]:f=d-.5,this.left+=s*(f-g),this.top+=u*(f-g),this.setCoords(),this.originX=d},_setOriginToCenter:function(){this._originalOriginX=this.originX,this._originalOriginY=this.originY;var d=this.getCenterPoint();this.originX="center",this.originY="center",this.left=d.x,this.top=d.y},_resetOrigin:function(){var d=this.translateToOriginPoint(this.getCenterPoint(),this._originalOriginX,this._originalOriginY);this.originX=this._originalOriginX,this.originY=this._originalOriginY,this.left=d.x,this.top=d.y,this._originalOriginX=null,this._originalOriginY=null},_getLeftTopCoords:function(){return this.translateToOriginPoint(this.getCenterPoint(),"left","top")}})}(),function(){function c(o){return[new t.Point(o.tl.x,o.tl.y),new t.Point(o.tr.x,o.tr.y),new t.Point(o.br.x,o.br.y),new t.Point(o.bl.x,o.bl.y)]}var i=t.util,h=i.degreesToRadians,d=i.multiplyTransformMatrices,a=i.transformPoint;i.object.extend(t.Object.prototype,{oCoords:null,aCoords:null,lineCoords:null,ownMatrixCache:null,matrixCache:null,controls:{},_getCoords:function(o,s){return s?o?this.calcACoords():this.calcLineCoords():((!this.aCoords||!this.lineCoords)&&this.setCoords(!0),o?this.aCoords:this.lineCoords)},getCoords:function(o,s){return c(this._getCoords(o,s))},intersectsWithRect:function(o,s,u,g){var f=this.getCoords(u,g),p=t.Intersection.intersectPolygonRectangle(f,o,s);return p.status==="Intersection"},intersectsWithObject:function(o,s,u){var g=t.Intersection.intersectPolygonPolygon(this.getCoords(s,u),o.getCoords(s,u));return g.status==="Intersection"||o.isContainedWithinObject(this,s,u)||this.isContainedWithinObject(o,s,u)},isContainedWithinObject:function(o,s,u){for(var g=this.getCoords(s,u),f=s?o.aCoords:o.lineCoords,p=0,v=o._getImageLines(f);p<4;p++)if(!o.containsPoint(g[p],v))return!1;return!0},isContainedWithinRect:function(o,s,u,g){var f=this.getBoundingRect(u,g);return f.left>=o.x&&f.left+f.width<=s.x&&f.top>=o.y&&f.top+f.height<=s.y},containsPoint:function(o,p,u,g){var f=this._getCoords(u,g),p=p||this._getImageLines(f),v=this._findCrossPoints(o,p);return v!==0&&v%2===1},isOnScreen:function(o){if(!this.canvas)return!1;var s=this.canvas.vptCoords.tl,u=this.canvas.vptCoords.br,g=this.getCoords(!0,o);return g.some(function(f){return f.x<=u.x&&f.x>=s.x&&f.y<=u.y&&f.y>=s.y})||this.intersectsWithRect(s,u,!0,o)?!0:this._containsCenterOfCanvas(s,u,o)},_containsCenterOfCanvas:function(o,s,u){var g={x:(o.x+s.x)/2,y:(o.y+s.y)/2};return!!this.containsPoint(g,null,!0,u)},isPartiallyOnScreen:function(o){if(!this.canvas)return!1;var s=this.canvas.vptCoords.tl,u=this.canvas.vptCoords.br;if(this.intersectsWithRect(s,u,!0,o))return!0;var g=this.getCoords(!0,o).every(function(f){return(f.x>=u.x||f.x<=s.x)&&(f.y>=u.y||f.y<=s.y)});return g&&this._containsCenterOfCanvas(s,u,o)},_getImageLines:function(o){var s={topline:{o:o.tl,d:o.tr},rightline:{o:o.tr,d:o.br},bottomline:{o:o.br,d:o.bl},leftline:{o:o.bl,d:o.tl}};return s},_findCrossPoints:function(o,s){var u,g,f,p,v,C=0,y;for(var E in s)if(y=s[E],!(y.o.y=o.y&&y.d.y>=o.y)&&(y.o.x===y.d.x&&y.o.x>=o.x?v=y.o.x:(u=0,g=(y.d.y-y.o.y)/(y.d.x-y.o.x),f=o.y-u*o.x,p=y.o.y-g*y.o.x,v=-(f-p)/(u-g)),v>=o.x&&(C+=1),C===2))break;return C},getBoundingRect:function(o,s){var u=this.getCoords(o,s);return i.makeBoundingBoxFromPoints(u)},getScaledWidth:function(){return this._getTransformedDimensions().x},getScaledHeight:function(){return this._getTransformedDimensions().y},_constrainScale:function(o){return Math.abs(o)"u"&&(o=this.skewX),typeof s>"u"&&(s=this.skewY);var u,g,f,p=o===0&&s===0;if(this.strokeUniform?(g=this.width,f=this.height):(u=this._getNonTransformedDimensions(),g=u.x,f=u.y),p)return this._finalizeDimensions(g*this.scaleX,f*this.scaleY);var v=i.sizeAfterTransform(g,f,{scaleX:this.scaleX,scaleY:this.scaleY,skewX:o,skewY:s});return this._finalizeDimensions(v.x,v.y)},_finalizeDimensions:function(o,s){return this.strokeUniform?{x:o+this.strokeWidth,y:s+this.strokeWidth}:{x:o,y:s}},_calculateCurrentDimensions:function(){var o=this.getViewportTransform(),s=this._getTransformedDimensions(),u=a(s,o,!0);return u.scalarAdd(2*this.padding)}})}(),t.util.object.extend(t.Object.prototype,{sendToBack:function(){return this.group?t.StaticCanvas.prototype.sendToBack.call(this.group,this):this.canvas&&this.canvas.sendToBack(this),this},bringToFront:function(){return this.group?t.StaticCanvas.prototype.bringToFront.call(this.group,this):this.canvas&&this.canvas.bringToFront(this),this},sendBackwards:function(c){return this.group?t.StaticCanvas.prototype.sendBackwards.call(this.group,this,c):this.canvas&&this.canvas.sendBackwards(this,c),this},bringForward:function(c){return this.group?t.StaticCanvas.prototype.bringForward.call(this.group,this,c):this.canvas&&this.canvas.bringForward(this,c),this},moveTo:function(c){return this.group&&this.group.type!=="activeSelection"?t.StaticCanvas.prototype.moveTo.call(this.group,this,c):this.canvas&&this.canvas.moveTo(this,c),this}}),function(){function c(h,d){if(d){if(d.toLive)return h+": url(#SVGID_"+d.id+"); ";var a=new t.Color(d),o=h+": "+a.toRgb()+"; ",s=a.getAlpha();return s!==1&&(o+=h+"-opacity: "+s.toString()+"; "),o}else return h+": none; "}var i=t.util.toFixed;t.util.object.extend(t.Object.prototype,{getSvgStyles:function(h){var d=this.fillRule?this.fillRule:"nonzero",a=this.strokeWidth?this.strokeWidth:"0",o=this.strokeDashArray?this.strokeDashArray.join(" "):"none",s=this.strokeDashOffset?this.strokeDashOffset:"0",u=this.strokeLineCap?this.strokeLineCap:"butt",g=this.strokeLineJoin?this.strokeLineJoin:"miter",f=this.strokeMiterLimit?this.strokeMiterLimit:"4",p=typeof this.opacity<"u"?this.opacity:"1",v=this.visible?"":" visibility: hidden;",C=h?"":this.getSvgFilter(),y=c("fill",this.fill),E=c("stroke",this.stroke);return[E,"stroke-width: ",a,"; ","stroke-dasharray: ",o,"; ","stroke-linecap: ",u,"; ","stroke-dashoffset: ",s,"; ","stroke-linejoin: ",g,"; ","stroke-miterlimit: ",f,"; ",y,"fill-rule: ",d,"; ","opacity: ",p,";",C,v].join("")},getSvgSpanStyles:function(h,d){var a="; ",s=h.fontFamily?"font-family: "+(h.fontFamily.indexOf("'")===-1&&h.fontFamily.indexOf('"')===-1?"'"+h.fontFamily+"'":h.fontFamily)+a:"",o=h.strokeWidth?"stroke-width: "+h.strokeWidth+a:"",s=s,u=h.fontSize?"font-size: "+h.fontSize+"px"+a:"",g=h.fontStyle?"font-style: "+h.fontStyle+a:"",f=h.fontWeight?"font-weight: "+h.fontWeight+a:"",p=h.fill?c("fill",h.fill):"",v=h.stroke?c("stroke",h.stroke):"",C=this.getSvgTextDecoration(h),y=h.deltaY?"baseline-shift: "+-h.deltaY+"; ":"";return C&&(C="text-decoration: "+C+a),[v,o,s,u,g,f,C,p,y,d?"white-space: pre; ":""].join("")},getSvgTextDecoration:function(h){return["overline","underline","line-through"].filter(function(d){return h[d.replace("-","")]}).join(" ")},getSvgFilter:function(){return this.shadow?"filter: url(#SVGID_"+this.shadow.id+");":""},getSvgCommons:function(){return[this.id?'id="'+this.id+'" ':"",this.clipPath?'clip-path="url(#'+this.clipPath.clipPathId+')" ':""].join("")},getSvgTransform:function(h,d){var a=h?this.calcTransformMatrix():this.calcOwnMatrix(),o='transform="'+t.util.matrixToSVG(a);return o+(d||"")+'" '},_setSVGBg:function(h){if(this.backgroundColor){var d=t.Object.NUM_FRACTION_DIGITS;h.push(" +`)}},toSVG:function(h){return this._createBaseSVGMarkup(this._toSVG(h),{reviver:h})},toClipPathSVG:function(h){return" "+this._createBaseClipPathSVGMarkup(this._toSVG(h),{reviver:h})},_createBaseClipPathSVGMarkup:function(h,d){d=d||{};var a=d.reviver,o=d.additionalTransform||"",s=[this.getSvgTransform(!0,o),this.getSvgCommons()].join(""),u=h.indexOf("COMMON_PARTS");return h[u]=s,a?a(h.join("")):h.join("")},_createBaseSVGMarkup:function(h,d){d=d||{};var a=d.noStyle,o=d.reviver,s=a?"":'style="'+this.getSvgStyles()+'" ',u=d.withShadow?'style="'+this.getSvgFilter()+'" ':"",g=this.clipPath,f=this.strokeUniform?'vector-effect="non-scaling-stroke" ':"",p=g&&g.absolutePositioned,v=this.stroke,C=this.fill,y=this.shadow,E,w=[],I,S=h.indexOf("COMMON_PARTS"),D=d.additionalTransform;return g&&(g.clipPathId="CLIPPATH_"+t.Object.__uid++,I=' `+g.toClipPathSVG(o)+` `),p&&w.push(" `),w.push(" `),E=[s,f,a?"":this.addPaintOrder()," ",D?'transform="'+D+'" ':""].join(""),h[S]=E,C&&C.toLive&&w.push(C.toSVG(this)),v&&v.toLive&&w.push(v.toSVG(this)),y&&w.push(y.toSVG(this)),g&&w.push(I),w.push(h.join("")),w.push(` `),p&&w.push(` -`),o?o(w.join("")):w.join("")},addPaintOrder:function(){return this.paintFirst!=="fill"?' paint-order="'+this.paintFirst+'" ':""}})}(),function(){var c=t.util.object.extend,i="stateProperties";function h(a,o,s){var u={},g=!0;s.forEach(function(f){u[f]=a[f]}),c(a[o],u,g)}function A(a,o,s){if(a===o)return!0;if(Array.isArray(a)){if(!Array.isArray(o)||a.length!==o.length)return!1;for(var u=0,g=a.length;u=0;g--)if(f=u[g],!!this.isControlVisible(f)&&(s=this._getImageLines(h?this.oCoords[f].touchCorner:this.oCoords[f].corner),o=this._findCrossPoints({x:A,y:a},s),o!==0&&o%2===1))return this.__corner=f,f;return!1},forEachControl:function(i){for(var h in this.controls)i(this.controls[h],h,this)},_setCornerCoords:function(){var i=this.oCoords;for(var h in i){var A=this.controls[h];i[h].corner=A.calcCornerCoords(this.angle,this.cornerSize,i[h].x,i[h].y,!1),i[h].touchCorner=A.calcCornerCoords(this.angle,this.touchCornerSize,i[h].x,i[h].y,!0)}},drawSelectionBackground:function(i){if(!this.selectionBackgroundColor||this.canvas&&!this.canvas.interactive||this.canvas&&this.canvas._activeObject!==this)return this;i.save();var h=this.getCenterPoint(),A=this._calculateCurrentDimensions(),a=this.canvas.viewportTransform;return i.translate(h.x,h.y),i.scale(1/a[0],1/a[3]),i.rotate(c(this.angle)),i.fillStyle=this.selectionBackgroundColor,i.fillRect(-A.x/2,-A.y/2,A.x,A.y),i.restore(),this},drawBorders:function(i,h){h=h||{};var A=this._calculateCurrentDimensions(),a=this.borderScaleFactor,o=A.x+a,s=A.y+a,u=typeof h.hasControls<"u"?h.hasControls:this.hasControls,g=!1;return i.save(),i.strokeStyle=h.borderColor||this.borderColor,this._setLineDash(i,h.borderDashArray||this.borderDashArray),i.strokeRect(-o/2,-s/2,o,s),u&&(i.beginPath(),this.forEachControl(function(f,p,v){f.withConnection&&f.getVisibility(v,p)&&(g=!0,i.moveTo(f.x*o,f.y*s),i.lineTo(f.x*o+f.offsetX,f.y*s+f.offsetY))}),g&&i.stroke()),i.restore(),this},drawBordersInGroup:function(i,h,A){A=A||{};var a=t.util.sizeAfterTransform(this.width,this.height,h),o=this.strokeWidth,s=this.strokeUniform,u=this.borderScaleFactor,g=a.x+o*(s?this.canvas.getZoom():h.scaleX)+u,f=a.y+o*(s?this.canvas.getZoom():h.scaleY)+u;return i.save(),this._setLineDash(i,A.borderDashArray||this.borderDashArray),i.strokeStyle=A.borderColor||this.borderColor,i.strokeRect(-g/2,-f/2,g,f),i.restore(),this},drawControls:function(i,h){h=h||{},i.save();var A=this.canvas.getRetinaScaling(),a,o;return i.setTransform(A,0,0,A,0,0),i.strokeStyle=i.fillStyle=h.cornerColor||this.cornerColor,this.transparentCorners||(i.strokeStyle=h.cornerStrokeColor||this.cornerStrokeColor),this._setLineDash(i,h.cornerDashArray||this.cornerDashArray),this.setCoords(),this.group&&(a=this.group.calcTransformMatrix()),this.forEachControl(function(s,u,g){o=g.oCoords[u],s.getVisibility(g,u)&&(a&&(o=t.util.transformPoint(o,a)),s.render(i,o.x,o.y,h,g))}),i.restore(),this},isControlVisible:function(i){return this.controls[i]&&this.controls[i].getVisibility(this,i)},setControlVisible:function(i,h){return this._controlsVisibility||(this._controlsVisibility={}),this._controlsVisibility[i]=h,this},setControlsVisibility:function(i){i||(i={});for(var h in i)this.setControlVisible(h,i[h]);return this},onDeselect:function(){},onSelect:function(){}})}(),t.util.object.extend(t.StaticCanvas.prototype,{FX_DURATION:500,fxCenterObjectH:function(c,i){i=i||{};var h=function(){},A=i.onComplete||h,a=i.onChange||h,o=this;return t.util.animate({target:this,startValue:c.left,endValue:this.getCenterPoint().x,duration:this.FX_DURATION,onChange:function(s){c.set("left",s),o.requestRenderAll(),a()},onComplete:function(){c.setCoords(),A()}})},fxCenterObjectV:function(c,i){i=i||{};var h=function(){},A=i.onComplete||h,a=i.onChange||h,o=this;return t.util.animate({target:this,startValue:c.top,endValue:this.getCenterPoint().y,duration:this.FX_DURATION,onChange:function(s){c.set("top",s),o.requestRenderAll(),a()},onComplete:function(){c.setCoords(),A()}})},fxRemove:function(c,i){i=i||{};var h=function(){},A=i.onComplete||h,a=i.onChange||h,o=this;return t.util.animate({target:this,startValue:c.opacity,endValue:0,duration:this.FX_DURATION,onChange:function(s){c.set("opacity",s),o.requestRenderAll(),a()},onComplete:function(){o.remove(c),A()}})}}),t.util.object.extend(t.Object.prototype,{animate:function(){if(arguments[0]&&typeof arguments[0]=="object"){var c=[],i,h,A=[];for(i in arguments[0])c.push(i);for(var a=0,o=c.length;a-1||o&&a.colorProperties.indexOf(o[1])>-1,u=o?this.get(o[0])[o[1]]:this.get(c);"from"in h||(h.from=u),s||(~i.indexOf("=")?i=u+parseFloat(i.replace("=","")):i=parseFloat(i));var g={target:this,startValue:h.from,endValue:i,byValue:h.by,easing:h.easing,duration:h.duration,abort:h.abort&&function(f,p,v){return h.abort.call(a,f,p,v)},onChange:function(f,p,v){o?a[o[0]][o[1]]=f:a.set(c,f),!A&&h.onChange&&h.onChange(f,p,v)},onComplete:function(f,p,v){A||(a.setCoords(),h.onComplete&&h.onComplete(f,p,v))}};return s?t.util.animateColor(g.startValue,g.endValue,g.duration,g):t.util.animate(g)}}),function(c){var i=c.fabric||(c.fabric={}),h=i.util.object.extend,A=i.util.object.clone,a={x1:1,x2:1,y1:1,y2:1};if(i.Line){i.warn("fabric.Line is already defined");return}i.Line=i.util.createClass(i.Object,{type:"line",x1:0,y1:0,x2:0,y2:0,cacheProperties:i.Object.prototype.cacheProperties.concat("x1","x2","y1","y2"),initialize:function(s,u){s||(s=[0,0,0,0]),this.callSuper("initialize",u),this.set("x1",s[0]),this.set("y1",s[1]),this.set("x2",s[2]),this.set("y2",s[3]),this._setWidthHeight(u)},_setWidthHeight:function(s){s||(s={}),this.width=Math.abs(this.x2-this.x1),this.height=Math.abs(this.y2-this.y1),this.left="left"in s?s.left:this._getLeftToOriginX(),this.top="top"in s?s.top:this._getTopToOriginY()},_set:function(s,u){return this.callSuper("_set",s,u),typeof a[s]<"u"&&this._setWidthHeight(),this},_getLeftToOriginX:o({origin:"originX",axis1:"x1",axis2:"x2",dimension:"width"},{nearest:"left",center:"center",farthest:"right"}),_getTopToOriginY:o({origin:"originY",axis1:"y1",axis2:"y2",dimension:"height"},{nearest:"top",center:"center",farthest:"bottom"}),_render:function(s){s.beginPath();var u=this.calcLinePoints();s.moveTo(u.x1,u.y1),s.lineTo(u.x2,u.y2),s.lineWidth=this.strokeWidth;var g=s.strokeStyle;s.strokeStyle=this.stroke||s.fillStyle,this.stroke&&this._renderStroke(s),s.strokeStyle=g},_findCenterFromElement:function(){return{x:(this.x1+this.x2)/2,y:(this.y1+this.y2)/2}},toObject:function(s){return h(this.callSuper("toObject",s),this.calcLinePoints())},_getNonTransformedDimensions:function(){var s=this.callSuper("_getNonTransformedDimensions");return this.strokeLineCap==="butt"&&(this.width===0&&(s.y-=this.strokeWidth),this.height===0&&(s.x-=this.strokeWidth)),s},calcLinePoints:function(){var s=this.x1<=this.x2?-1:1,u=this.y1<=this.y2?-1:1,g=s*this.width*.5,f=u*this.height*.5,p=s*this.width*-.5,v=u*this.height*-.5;return{x1:g,x2:p,y1:f,y2:v}},_toSVG:function(){var s=this.calcLinePoints();return[" -`]}}),i.Line.ATTRIBUTE_NAMES=i.SHARED_ATTRIBUTES.concat("x1 y1 x2 y2".split(" ")),i.Line.fromElement=function(s,u,g){g=g||{};var f=i.parseAttributes(s,i.Line.ATTRIBUTE_NAMES),p=[f.x1||0,f.y1||0,f.x2||0,f.y2||0];u(new i.Line(p,h(f,g)))},i.Line.fromObject=function(s,u){function g(p){delete p.points,u&&u(p)}var f=A(s,!0);f.points=[s.x1,s.y1,s.x2,s.y2],i.Object._fromObject("Line",f,g,"points")};function o(s,u){var g=s.origin,f=s.axis1,p=s.axis2,v=s.dimension,C=u.nearest,y=u.center,E=u.farthest;return function(){switch(this.get(g)){case C:return Math.min(this.get(f),this.get(p));case y:return Math.min(this.get(f),this.get(p))+.5*this.get(v);case E:return Math.max(this.get(f),this.get(p))}}}}(e),function(c){var i=c.fabric||(c.fabric={}),h=i.util.degreesToRadians;if(i.Circle){i.warn("fabric.Circle is already defined.");return}i.Circle=i.util.createClass(i.Object,{type:"circle",radius:0,startAngle:0,endAngle:360,cacheProperties:i.Object.prototype.cacheProperties.concat("radius","startAngle","endAngle"),_set:function(a,o){return this.callSuper("_set",a,o),a==="radius"&&this.setRadius(o),this},toObject:function(a){return this.callSuper("toObject",["radius","startAngle","endAngle"].concat(a))},_toSVG:function(){var a,o=0,s=0,u=(this.endAngle-this.startAngle)%360;if(u===0)a=[" +`),o?o(w.join("")):w.join("")},addPaintOrder:function(){return this.paintFirst!=="fill"?' paint-order="'+this.paintFirst+'" ':""}})}(),function(){var c=t.util.object.extend,i="stateProperties";function h(a,o,s){var u={},g=!0;s.forEach(function(f){u[f]=a[f]}),c(a[o],u,g)}function d(a,o,s){if(a===o)return!0;if(Array.isArray(a)){if(!Array.isArray(o)||a.length!==o.length)return!1;for(var u=0,g=a.length;u=0;g--)if(f=u[g],!!this.isControlVisible(f)&&(s=this._getImageLines(h?this.oCoords[f].touchCorner:this.oCoords[f].corner),o=this._findCrossPoints({x:d,y:a},s),o!==0&&o%2===1))return this.__corner=f,f;return!1},forEachControl:function(i){for(var h in this.controls)i(this.controls[h],h,this)},_setCornerCoords:function(){var i=this.oCoords;for(var h in i){var d=this.controls[h];i[h].corner=d.calcCornerCoords(this.angle,this.cornerSize,i[h].x,i[h].y,!1),i[h].touchCorner=d.calcCornerCoords(this.angle,this.touchCornerSize,i[h].x,i[h].y,!0)}},drawSelectionBackground:function(i){if(!this.selectionBackgroundColor||this.canvas&&!this.canvas.interactive||this.canvas&&this.canvas._activeObject!==this)return this;i.save();var h=this.getCenterPoint(),d=this._calculateCurrentDimensions(),a=this.canvas.viewportTransform;return i.translate(h.x,h.y),i.scale(1/a[0],1/a[3]),i.rotate(c(this.angle)),i.fillStyle=this.selectionBackgroundColor,i.fillRect(-d.x/2,-d.y/2,d.x,d.y),i.restore(),this},drawBorders:function(i,h){h=h||{};var d=this._calculateCurrentDimensions(),a=this.borderScaleFactor,o=d.x+a,s=d.y+a,u=typeof h.hasControls<"u"?h.hasControls:this.hasControls,g=!1;return i.save(),i.strokeStyle=h.borderColor||this.borderColor,this._setLineDash(i,h.borderDashArray||this.borderDashArray),i.strokeRect(-o/2,-s/2,o,s),u&&(i.beginPath(),this.forEachControl(function(f,p,v){f.withConnection&&f.getVisibility(v,p)&&(g=!0,i.moveTo(f.x*o,f.y*s),i.lineTo(f.x*o+f.offsetX,f.y*s+f.offsetY))}),g&&i.stroke()),i.restore(),this},drawBordersInGroup:function(i,h,d){d=d||{};var a=t.util.sizeAfterTransform(this.width,this.height,h),o=this.strokeWidth,s=this.strokeUniform,u=this.borderScaleFactor,g=a.x+o*(s?this.canvas.getZoom():h.scaleX)+u,f=a.y+o*(s?this.canvas.getZoom():h.scaleY)+u;return i.save(),this._setLineDash(i,d.borderDashArray||this.borderDashArray),i.strokeStyle=d.borderColor||this.borderColor,i.strokeRect(-g/2,-f/2,g,f),i.restore(),this},drawControls:function(i,h){h=h||{},i.save();var d=this.canvas.getRetinaScaling(),a,o;return i.setTransform(d,0,0,d,0,0),i.strokeStyle=i.fillStyle=h.cornerColor||this.cornerColor,this.transparentCorners||(i.strokeStyle=h.cornerStrokeColor||this.cornerStrokeColor),this._setLineDash(i,h.cornerDashArray||this.cornerDashArray),this.setCoords(),this.group&&(a=this.group.calcTransformMatrix()),this.forEachControl(function(s,u,g){o=g.oCoords[u],s.getVisibility(g,u)&&(a&&(o=t.util.transformPoint(o,a)),s.render(i,o.x,o.y,h,g))}),i.restore(),this},isControlVisible:function(i){return this.controls[i]&&this.controls[i].getVisibility(this,i)},setControlVisible:function(i,h){return this._controlsVisibility||(this._controlsVisibility={}),this._controlsVisibility[i]=h,this},setControlsVisibility:function(i){i||(i={});for(var h in i)this.setControlVisible(h,i[h]);return this},onDeselect:function(){},onSelect:function(){}})}(),t.util.object.extend(t.StaticCanvas.prototype,{FX_DURATION:500,fxCenterObjectH:function(c,i){i=i||{};var h=function(){},d=i.onComplete||h,a=i.onChange||h,o=this;return t.util.animate({target:this,startValue:c.left,endValue:this.getCenterPoint().x,duration:this.FX_DURATION,onChange:function(s){c.set("left",s),o.requestRenderAll(),a()},onComplete:function(){c.setCoords(),d()}})},fxCenterObjectV:function(c,i){i=i||{};var h=function(){},d=i.onComplete||h,a=i.onChange||h,o=this;return t.util.animate({target:this,startValue:c.top,endValue:this.getCenterPoint().y,duration:this.FX_DURATION,onChange:function(s){c.set("top",s),o.requestRenderAll(),a()},onComplete:function(){c.setCoords(),d()}})},fxRemove:function(c,i){i=i||{};var h=function(){},d=i.onComplete||h,a=i.onChange||h,o=this;return t.util.animate({target:this,startValue:c.opacity,endValue:0,duration:this.FX_DURATION,onChange:function(s){c.set("opacity",s),o.requestRenderAll(),a()},onComplete:function(){o.remove(c),d()}})}}),t.util.object.extend(t.Object.prototype,{animate:function(){if(arguments[0]&&typeof arguments[0]=="object"){var c=[],i,h,d=[];for(i in arguments[0])c.push(i);for(var a=0,o=c.length;a-1||o&&a.colorProperties.indexOf(o[1])>-1,u=o?this.get(o[0])[o[1]]:this.get(c);"from"in h||(h.from=u),s||(~i.indexOf("=")?i=u+parseFloat(i.replace("=","")):i=parseFloat(i));var g={target:this,startValue:h.from,endValue:i,byValue:h.by,easing:h.easing,duration:h.duration,abort:h.abort&&function(f,p,v){return h.abort.call(a,f,p,v)},onChange:function(f,p,v){o?a[o[0]][o[1]]=f:a.set(c,f),!d&&h.onChange&&h.onChange(f,p,v)},onComplete:function(f,p,v){d||(a.setCoords(),h.onComplete&&h.onComplete(f,p,v))}};return s?t.util.animateColor(g.startValue,g.endValue,g.duration,g):t.util.animate(g)}}),function(c){var i=c.fabric||(c.fabric={}),h=i.util.object.extend,d=i.util.object.clone,a={x1:1,x2:1,y1:1,y2:1};if(i.Line){i.warn("fabric.Line is already defined");return}i.Line=i.util.createClass(i.Object,{type:"line",x1:0,y1:0,x2:0,y2:0,cacheProperties:i.Object.prototype.cacheProperties.concat("x1","x2","y1","y2"),initialize:function(s,u){s||(s=[0,0,0,0]),this.callSuper("initialize",u),this.set("x1",s[0]),this.set("y1",s[1]),this.set("x2",s[2]),this.set("y2",s[3]),this._setWidthHeight(u)},_setWidthHeight:function(s){s||(s={}),this.width=Math.abs(this.x2-this.x1),this.height=Math.abs(this.y2-this.y1),this.left="left"in s?s.left:this._getLeftToOriginX(),this.top="top"in s?s.top:this._getTopToOriginY()},_set:function(s,u){return this.callSuper("_set",s,u),typeof a[s]<"u"&&this._setWidthHeight(),this},_getLeftToOriginX:o({origin:"originX",axis1:"x1",axis2:"x2",dimension:"width"},{nearest:"left",center:"center",farthest:"right"}),_getTopToOriginY:o({origin:"originY",axis1:"y1",axis2:"y2",dimension:"height"},{nearest:"top",center:"center",farthest:"bottom"}),_render:function(s){s.beginPath();var u=this.calcLinePoints();s.moveTo(u.x1,u.y1),s.lineTo(u.x2,u.y2),s.lineWidth=this.strokeWidth;var g=s.strokeStyle;s.strokeStyle=this.stroke||s.fillStyle,this.stroke&&this._renderStroke(s),s.strokeStyle=g},_findCenterFromElement:function(){return{x:(this.x1+this.x2)/2,y:(this.y1+this.y2)/2}},toObject:function(s){return h(this.callSuper("toObject",s),this.calcLinePoints())},_getNonTransformedDimensions:function(){var s=this.callSuper("_getNonTransformedDimensions");return this.strokeLineCap==="butt"&&(this.width===0&&(s.y-=this.strokeWidth),this.height===0&&(s.x-=this.strokeWidth)),s},calcLinePoints:function(){var s=this.x1<=this.x2?-1:1,u=this.y1<=this.y2?-1:1,g=s*this.width*.5,f=u*this.height*.5,p=s*this.width*-.5,v=u*this.height*-.5;return{x1:g,x2:p,y1:f,y2:v}},_toSVG:function(){var s=this.calcLinePoints();return[" +`]}}),i.Line.ATTRIBUTE_NAMES=i.SHARED_ATTRIBUTES.concat("x1 y1 x2 y2".split(" ")),i.Line.fromElement=function(s,u,g){g=g||{};var f=i.parseAttributes(s,i.Line.ATTRIBUTE_NAMES),p=[f.x1||0,f.y1||0,f.x2||0,f.y2||0];u(new i.Line(p,h(f,g)))},i.Line.fromObject=function(s,u){function g(p){delete p.points,u&&u(p)}var f=d(s,!0);f.points=[s.x1,s.y1,s.x2,s.y2],i.Object._fromObject("Line",f,g,"points")};function o(s,u){var g=s.origin,f=s.axis1,p=s.axis2,v=s.dimension,C=u.nearest,y=u.center,E=u.farthest;return function(){switch(this.get(g)){case C:return Math.min(this.get(f),this.get(p));case y:return Math.min(this.get(f),this.get(p))+.5*this.get(v);case E:return Math.max(this.get(f),this.get(p))}}}}(e),function(c){var i=c.fabric||(c.fabric={}),h=i.util.degreesToRadians;if(i.Circle){i.warn("fabric.Circle is already defined.");return}i.Circle=i.util.createClass(i.Object,{type:"circle",radius:0,startAngle:0,endAngle:360,cacheProperties:i.Object.prototype.cacheProperties.concat("radius","startAngle","endAngle"),_set:function(a,o){return this.callSuper("_set",a,o),a==="radius"&&this.setRadius(o),this},toObject:function(a){return this.callSuper("toObject",["radius","startAngle","endAngle"].concat(a))},_toSVG:function(){var a,o=0,s=0,u=(this.endAngle-this.startAngle)%360;if(u===0)a=[" `];else{var g=h(this.startAngle),f=h(this.endAngle),p=this.radius,v=i.util.cos(g)*p,C=i.util.sin(g)*p,y=i.util.cos(f)*p,E=i.util.sin(f)*p,w=u>180?"1":"0";a=[' -`]}return a},_render:function(a){a.beginPath(),a.arc(0,0,this.radius,h(this.startAngle),h(this.endAngle),!1),this._renderPaintInOrder(a)},getRadiusX:function(){return this.get("radius")*this.get("scaleX")},getRadiusY:function(){return this.get("radius")*this.get("scaleY")},setRadius:function(a){return this.radius=a,this.set("width",a*2).set("height",a*2)}}),i.Circle.ATTRIBUTE_NAMES=i.SHARED_ATTRIBUTES.concat("cx cy r".split(" ")),i.Circle.fromElement=function(a,o){var s=i.parseAttributes(a,i.Circle.ATTRIBUTE_NAMES);if(!A(s))throw new Error("value of `r` attribute is required and can not be negative");s.left=(s.left||0)-s.radius,s.top=(s.top||0)-s.radius,o(new i.Circle(s))};function A(a){return"radius"in a&&a.radius>=0}i.Circle.fromObject=function(a,o){i.Object._fromObject("Circle",a,o)}}(e),function(c){var i=c.fabric||(c.fabric={});if(i.Triangle){i.warn("fabric.Triangle is already defined");return}i.Triangle=i.util.createClass(i.Object,{type:"triangle",width:100,height:100,_render:function(h){var A=this.width/2,a=this.height/2;h.beginPath(),h.moveTo(-A,a),h.lineTo(0,-a),h.lineTo(A,a),h.closePath(),this._renderPaintInOrder(h)},_toSVG:function(){var h=this.width/2,A=this.height/2,a=[-h+" "+A,"0 "+-A,h+" "+A].join(",");return["']}}),i.Triangle.fromObject=function(h,A){return i.Object._fromObject("Triangle",h,A)}}(e),function(c){var i=c.fabric||(c.fabric={}),h=Math.PI*2;if(i.Ellipse){i.warn("fabric.Ellipse is already defined.");return}i.Ellipse=i.util.createClass(i.Object,{type:"ellipse",rx:0,ry:0,cacheProperties:i.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(A){this.callSuper("initialize",A),this.set("rx",A&&A.rx||0),this.set("ry",A&&A.ry||0)},_set:function(A,a){switch(this.callSuper("_set",A,a),A){case"rx":this.rx=a,this.set("width",a*2);break;case"ry":this.ry=a,this.set("height",a*2);break}return this},getRx:function(){return this.get("rx")*this.get("scaleX")},getRy:function(){return this.get("ry")*this.get("scaleY")},toObject:function(A){return this.callSuper("toObject",["rx","ry"].concat(A))},_toSVG:function(){return[" -`]},_render:function(A){A.beginPath(),A.save(),A.transform(1,0,0,this.ry/this.rx,0,0),A.arc(0,0,this.rx,0,h,!1),A.restore(),this._renderPaintInOrder(A)}}),i.Ellipse.ATTRIBUTE_NAMES=i.SHARED_ATTRIBUTES.concat("cx cy rx ry".split(" ")),i.Ellipse.fromElement=function(A,a){var o=i.parseAttributes(A,i.Ellipse.ATTRIBUTE_NAMES);o.left=(o.left||0)-o.rx,o.top=(o.top||0)-o.ry,a(new i.Ellipse(o))},i.Ellipse.fromObject=function(A,a){i.Object._fromObject("Ellipse",A,a)}}(e),function(c){var i=c.fabric||(c.fabric={}),h=i.util.object.extend;if(i.Rect){i.warn("fabric.Rect is already defined");return}i.Rect=i.util.createClass(i.Object,{stateProperties:i.Object.prototype.stateProperties.concat("rx","ry"),type:"rect",rx:0,ry:0,cacheProperties:i.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(A){this.callSuper("initialize",A),this._initRxRy()},_initRxRy:function(){this.rx&&!this.ry?this.ry=this.rx:this.ry&&!this.rx&&(this.rx=this.ry)},_render:function(A){var a=this.rx?Math.min(this.rx,this.width/2):0,o=this.ry?Math.min(this.ry,this.height/2):0,s=this.width,u=this.height,g=-this.width/2,f=-this.height/2,p=a!==0||o!==0,v=1-.5522847498;A.beginPath(),A.moveTo(g+a,f),A.lineTo(g+s-a,f),p&&A.bezierCurveTo(g+s-v*a,f,g+s,f+v*o,g+s,f+o),A.lineTo(g+s,f+u-o),p&&A.bezierCurveTo(g+s,f+u-v*o,g+s-v*a,f+u,g+s-a,f+u),A.lineTo(g+a,f+u),p&&A.bezierCurveTo(g+v*a,f+u,g,f+u-v*o,g,f+u-o),A.lineTo(g,f+o),p&&A.bezierCurveTo(g,f+v*o,g+v*a,f,g+a,f),A.closePath(),this._renderPaintInOrder(A)},toObject:function(A){return this.callSuper("toObject",["rx","ry"].concat(A))},_toSVG:function(){var A=-this.width/2,a=-this.height/2;return[" -`]}}),i.Rect.ATTRIBUTE_NAMES=i.SHARED_ATTRIBUTES.concat("x y rx ry width height".split(" ")),i.Rect.fromElement=function(A,a,o){if(!A)return a(null);o=o||{};var s=i.parseAttributes(A,i.Rect.ATTRIBUTE_NAMES);s.left=s.left||0,s.top=s.top||0,s.height=s.height||0,s.width=s.width||0;var u=new i.Rect(h(o?i.util.object.clone(o):{},s));u.visible=u.visible&&u.width>0&&u.height>0,a(u)},i.Rect.fromObject=function(A,a){return i.Object._fromObject("Rect",A,a)}}(e),function(c){var i=c.fabric||(c.fabric={}),h=i.util.object.extend,A=i.util.array.min,a=i.util.array.max,o=i.util.toFixed,s=i.util.projectStrokeOnPoints;if(i.Polyline){i.warn("fabric.Polyline is already defined");return}i.Polyline=i.util.createClass(i.Object,{type:"polyline",points:null,exactBoundingBox:!1,cacheProperties:i.Object.prototype.cacheProperties.concat("points"),initialize:function(u,g){g=g||{},this.points=u||[],this.callSuper("initialize",g),this._setPositionDimensions(g)},_projectStrokeOnPoints:function(){return s(this.points,this,!0)},_setPositionDimensions:function(u){var g=this._calcDimensions(u),f,p=this.exactBoundingBox?this.strokeWidth:0;this.width=g.width-p,this.height=g.height-p,u.fromSVG||(f=this.translateToGivenOrigin({x:g.left-this.strokeWidth/2+p/2,y:g.top-this.strokeWidth/2+p/2},"left","top",this.originX,this.originY)),typeof u.left>"u"&&(this.left=u.fromSVG?g.left:f.x),typeof u.top>"u"&&(this.top=u.fromSVG?g.top:f.y),this.pathOffset={x:g.left+this.width/2+p/2,y:g.top+this.height/2+p/2}},_calcDimensions:function(){var u=this.exactBoundingBox?this._projectStrokeOnPoints():this.points,g=A(u,"x")||0,f=A(u,"y")||0,p=a(u,"x")||0,v=a(u,"y")||0,C=p-g,y=v-f;return{left:g,top:f,width:C,height:y}},toObject:function(u){return h(this.callSuper("toObject",u),{points:this.points.concat()})},_toSVG:function(){for(var u=[],g=this.pathOffset.x,f=this.pathOffset.y,p=i.Object.NUM_FRACTION_DIGITS,v=0,C=this.points.length;v -`]},commonRender:function(u){var g,f=this.points.length,p=this.pathOffset.x,v=this.pathOffset.y;if(!f||isNaN(this.points[f-1].y))return!1;u.beginPath(),u.moveTo(this.points[0].x-p,this.points[0].y-v);for(var C=0;C"},toObject:function(u){return a(this.callSuper("toObject",u),{path:this.path.map(function(g){return g.slice()})})},toDatalessObject:function(u){var g=this.toObject(["sourcePath"].concat(u));return g.sourcePath&&delete g.path,g},_toSVG:function(){var u=i.util.joinPath(this.path);return[" -`]},_getOffsetTransform:function(){var u=i.Object.NUM_FRACTION_DIGITS;return" translate("+s(-this.pathOffset.x,u)+", "+s(-this.pathOffset.y,u)+")"},toClipPathSVG:function(u){var g=this._getOffsetTransform();return" "+this._createBaseClipPathSVGMarkup(this._toSVG(),{reviver:u,additionalTransform:g})},toSVG:function(u){var g=this._getOffsetTransform();return this._createBaseSVGMarkup(this._toSVG(),{reviver:u,additionalTransform:g})},complexity:function(){return this.path.length},_calcDimensions:function(){for(var u=[],g=[],f,p=0,v=0,C=0,y=0,E,w=0,I=this.path.length;w"},addWithUpdate:function(a){var o=!!this.group;return this._restoreObjectsState(),i.util.resetObjectTransform(this),a&&(o&&i.util.removeTransformFromObject(a,this.group.calcTransformMatrix()),this._objects.push(a),a.group=this,a._set("canvas",this.canvas)),this._calcBounds(),this._updateObjectsCoords(),this.dirty=!0,o?this.group.addWithUpdate():this.setCoords(),this},removeWithUpdate:function(a){return this._restoreObjectsState(),i.util.resetObjectTransform(this),this.remove(a),this._calcBounds(),this._updateObjectsCoords(),this.setCoords(),this.dirty=!0,this},_onObjectAdded:function(a){this.dirty=!0,a.group=this,a._set("canvas",this.canvas)},_onObjectRemoved:function(a){this.dirty=!0,delete a.group},_set:function(a,o){var s=this._objects.length;if(this.useSetOnGroup)for(;s--;)this._objects[s].setOnGroup(a,o);if(a==="canvas")for(;s--;)this._objects[s]._set(a,o);i.Object.prototype._set.call(this,a,o)},toObject:function(a){var o=this.includeDefaultValues,s=this._objects.filter(function(g){return!g.excludeFromExport}).map(function(g){var f=g.includeDefaultValues;g.includeDefaultValues=o;var p=g.toObject(a);return g.includeDefaultValues=f,p}),u=i.Object.prototype.toObject.call(this,a);return u.objects=s,u},toDatalessObject:function(a){var o,s=this.sourcePath;if(s)o=s;else{var u=this.includeDefaultValues;o=this._objects.map(function(f){var p=f.includeDefaultValues;f.includeDefaultValues=u;var v=f.toDatalessObject(a);return f.includeDefaultValues=p,v})}var g=i.Object.prototype.toDatalessObject.call(this,a);return g.objects=o,g},render:function(a){this._transformDone=!0,this.callSuper("render",a),this._transformDone=!1},shouldCache:function(){var a=i.Object.prototype.shouldCache.call(this);if(a){for(var o=0,s=this._objects.length;o +`]}return a},_render:function(a){a.beginPath(),a.arc(0,0,this.radius,h(this.startAngle),h(this.endAngle),!1),this._renderPaintInOrder(a)},getRadiusX:function(){return this.get("radius")*this.get("scaleX")},getRadiusY:function(){return this.get("radius")*this.get("scaleY")},setRadius:function(a){return this.radius=a,this.set("width",a*2).set("height",a*2)}}),i.Circle.ATTRIBUTE_NAMES=i.SHARED_ATTRIBUTES.concat("cx cy r".split(" ")),i.Circle.fromElement=function(a,o){var s=i.parseAttributes(a,i.Circle.ATTRIBUTE_NAMES);if(!d(s))throw new Error("value of `r` attribute is required and can not be negative");s.left=(s.left||0)-s.radius,s.top=(s.top||0)-s.radius,o(new i.Circle(s))};function d(a){return"radius"in a&&a.radius>=0}i.Circle.fromObject=function(a,o){i.Object._fromObject("Circle",a,o)}}(e),function(c){var i=c.fabric||(c.fabric={});if(i.Triangle){i.warn("fabric.Triangle is already defined");return}i.Triangle=i.util.createClass(i.Object,{type:"triangle",width:100,height:100,_render:function(h){var d=this.width/2,a=this.height/2;h.beginPath(),h.moveTo(-d,a),h.lineTo(0,-a),h.lineTo(d,a),h.closePath(),this._renderPaintInOrder(h)},_toSVG:function(){var h=this.width/2,d=this.height/2,a=[-h+" "+d,"0 "+-d,h+" "+d].join(",");return["']}}),i.Triangle.fromObject=function(h,d){return i.Object._fromObject("Triangle",h,d)}}(e),function(c){var i=c.fabric||(c.fabric={}),h=Math.PI*2;if(i.Ellipse){i.warn("fabric.Ellipse is already defined.");return}i.Ellipse=i.util.createClass(i.Object,{type:"ellipse",rx:0,ry:0,cacheProperties:i.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(d){this.callSuper("initialize",d),this.set("rx",d&&d.rx||0),this.set("ry",d&&d.ry||0)},_set:function(d,a){switch(this.callSuper("_set",d,a),d){case"rx":this.rx=a,this.set("width",a*2);break;case"ry":this.ry=a,this.set("height",a*2);break}return this},getRx:function(){return this.get("rx")*this.get("scaleX")},getRy:function(){return this.get("ry")*this.get("scaleY")},toObject:function(d){return this.callSuper("toObject",["rx","ry"].concat(d))},_toSVG:function(){return[" +`]},_render:function(d){d.beginPath(),d.save(),d.transform(1,0,0,this.ry/this.rx,0,0),d.arc(0,0,this.rx,0,h,!1),d.restore(),this._renderPaintInOrder(d)}}),i.Ellipse.ATTRIBUTE_NAMES=i.SHARED_ATTRIBUTES.concat("cx cy rx ry".split(" ")),i.Ellipse.fromElement=function(d,a){var o=i.parseAttributes(d,i.Ellipse.ATTRIBUTE_NAMES);o.left=(o.left||0)-o.rx,o.top=(o.top||0)-o.ry,a(new i.Ellipse(o))},i.Ellipse.fromObject=function(d,a){i.Object._fromObject("Ellipse",d,a)}}(e),function(c){var i=c.fabric||(c.fabric={}),h=i.util.object.extend;if(i.Rect){i.warn("fabric.Rect is already defined");return}i.Rect=i.util.createClass(i.Object,{stateProperties:i.Object.prototype.stateProperties.concat("rx","ry"),type:"rect",rx:0,ry:0,cacheProperties:i.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(d){this.callSuper("initialize",d),this._initRxRy()},_initRxRy:function(){this.rx&&!this.ry?this.ry=this.rx:this.ry&&!this.rx&&(this.rx=this.ry)},_render:function(d){var a=this.rx?Math.min(this.rx,this.width/2):0,o=this.ry?Math.min(this.ry,this.height/2):0,s=this.width,u=this.height,g=-this.width/2,f=-this.height/2,p=a!==0||o!==0,v=1-.5522847498;d.beginPath(),d.moveTo(g+a,f),d.lineTo(g+s-a,f),p&&d.bezierCurveTo(g+s-v*a,f,g+s,f+v*o,g+s,f+o),d.lineTo(g+s,f+u-o),p&&d.bezierCurveTo(g+s,f+u-v*o,g+s-v*a,f+u,g+s-a,f+u),d.lineTo(g+a,f+u),p&&d.bezierCurveTo(g+v*a,f+u,g,f+u-v*o,g,f+u-o),d.lineTo(g,f+o),p&&d.bezierCurveTo(g,f+v*o,g+v*a,f,g+a,f),d.closePath(),this._renderPaintInOrder(d)},toObject:function(d){return this.callSuper("toObject",["rx","ry"].concat(d))},_toSVG:function(){var d=-this.width/2,a=-this.height/2;return[" +`]}}),i.Rect.ATTRIBUTE_NAMES=i.SHARED_ATTRIBUTES.concat("x y rx ry width height".split(" ")),i.Rect.fromElement=function(d,a,o){if(!d)return a(null);o=o||{};var s=i.parseAttributes(d,i.Rect.ATTRIBUTE_NAMES);s.left=s.left||0,s.top=s.top||0,s.height=s.height||0,s.width=s.width||0;var u=new i.Rect(h(o?i.util.object.clone(o):{},s));u.visible=u.visible&&u.width>0&&u.height>0,a(u)},i.Rect.fromObject=function(d,a){return i.Object._fromObject("Rect",d,a)}}(e),function(c){var i=c.fabric||(c.fabric={}),h=i.util.object.extend,d=i.util.array.min,a=i.util.array.max,o=i.util.toFixed,s=i.util.projectStrokeOnPoints;if(i.Polyline){i.warn("fabric.Polyline is already defined");return}i.Polyline=i.util.createClass(i.Object,{type:"polyline",points:null,exactBoundingBox:!1,cacheProperties:i.Object.prototype.cacheProperties.concat("points"),initialize:function(u,g){g=g||{},this.points=u||[],this.callSuper("initialize",g),this._setPositionDimensions(g)},_projectStrokeOnPoints:function(){return s(this.points,this,!0)},_setPositionDimensions:function(u){var g=this._calcDimensions(u),f,p=this.exactBoundingBox?this.strokeWidth:0;this.width=g.width-p,this.height=g.height-p,u.fromSVG||(f=this.translateToGivenOrigin({x:g.left-this.strokeWidth/2+p/2,y:g.top-this.strokeWidth/2+p/2},"left","top",this.originX,this.originY)),typeof u.left>"u"&&(this.left=u.fromSVG?g.left:f.x),typeof u.top>"u"&&(this.top=u.fromSVG?g.top:f.y),this.pathOffset={x:g.left+this.width/2+p/2,y:g.top+this.height/2+p/2}},_calcDimensions:function(){var u=this.exactBoundingBox?this._projectStrokeOnPoints():this.points,g=d(u,"x")||0,f=d(u,"y")||0,p=a(u,"x")||0,v=a(u,"y")||0,C=p-g,y=v-f;return{left:g,top:f,width:C,height:y}},toObject:function(u){return h(this.callSuper("toObject",u),{points:this.points.concat()})},_toSVG:function(){for(var u=[],g=this.pathOffset.x,f=this.pathOffset.y,p=i.Object.NUM_FRACTION_DIGITS,v=0,C=this.points.length;v +`]},commonRender:function(u){var g,f=this.points.length,p=this.pathOffset.x,v=this.pathOffset.y;if(!f||isNaN(this.points[f-1].y))return!1;u.beginPath(),u.moveTo(this.points[0].x-p,this.points[0].y-v);for(var C=0;C"},toObject:function(u){return a(this.callSuper("toObject",u),{path:this.path.map(function(g){return g.slice()})})},toDatalessObject:function(u){var g=this.toObject(["sourcePath"].concat(u));return g.sourcePath&&delete g.path,g},_toSVG:function(){var u=i.util.joinPath(this.path);return[" +`]},_getOffsetTransform:function(){var u=i.Object.NUM_FRACTION_DIGITS;return" translate("+s(-this.pathOffset.x,u)+", "+s(-this.pathOffset.y,u)+")"},toClipPathSVG:function(u){var g=this._getOffsetTransform();return" "+this._createBaseClipPathSVGMarkup(this._toSVG(),{reviver:u,additionalTransform:g})},toSVG:function(u){var g=this._getOffsetTransform();return this._createBaseSVGMarkup(this._toSVG(),{reviver:u,additionalTransform:g})},complexity:function(){return this.path.length},_calcDimensions:function(){for(var u=[],g=[],f,p=0,v=0,C=0,y=0,E,w=0,I=this.path.length;w"},addWithUpdate:function(a){var o=!!this.group;return this._restoreObjectsState(),i.util.resetObjectTransform(this),a&&(o&&i.util.removeTransformFromObject(a,this.group.calcTransformMatrix()),this._objects.push(a),a.group=this,a._set("canvas",this.canvas)),this._calcBounds(),this._updateObjectsCoords(),this.dirty=!0,o?this.group.addWithUpdate():this.setCoords(),this},removeWithUpdate:function(a){return this._restoreObjectsState(),i.util.resetObjectTransform(this),this.remove(a),this._calcBounds(),this._updateObjectsCoords(),this.setCoords(),this.dirty=!0,this},_onObjectAdded:function(a){this.dirty=!0,a.group=this,a._set("canvas",this.canvas)},_onObjectRemoved:function(a){this.dirty=!0,delete a.group},_set:function(a,o){var s=this._objects.length;if(this.useSetOnGroup)for(;s--;)this._objects[s].setOnGroup(a,o);if(a==="canvas")for(;s--;)this._objects[s]._set(a,o);i.Object.prototype._set.call(this,a,o)},toObject:function(a){var o=this.includeDefaultValues,s=this._objects.filter(function(g){return!g.excludeFromExport}).map(function(g){var f=g.includeDefaultValues;g.includeDefaultValues=o;var p=g.toObject(a);return g.includeDefaultValues=f,p}),u=i.Object.prototype.toObject.call(this,a);return u.objects=s,u},toDatalessObject:function(a){var o,s=this.sourcePath;if(s)o=s;else{var u=this.includeDefaultValues;o=this._objects.map(function(f){var p=f.includeDefaultValues;f.includeDefaultValues=u;var v=f.toDatalessObject(a);return f.includeDefaultValues=p,v})}var g=i.Object.prototype.toDatalessObject.call(this,a);return g.objects=o,g},render:function(a){this._transformDone=!0,this.callSuper("render",a),this._transformDone=!1},shouldCache:function(){var a=i.Object.prototype.shouldCache.call(this);if(a){for(var o=0,s=this._objects.length;o `],s=0,u=this._objects.length;s -`),o},getSvgStyles:function(){var a=typeof this.opacity<"u"&&this.opacity!==1?"opacity: "+this.opacity+";":"",o=this.visible?"":" visibility: hidden;";return[a,this.getSvgFilter(),o].join("")},toClipPathSVG:function(a){for(var o=[],s=0,u=this._objects.length;s"},shouldCache:function(){return!1},isOnACache:function(){return!1},_renderControls:function(h,A,a){h.save(),h.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1,this.callSuper("_renderControls",h,A),a=a||{},typeof a.hasControls>"u"&&(a.hasControls=!1),a.forActiveSelection=!0;for(var o=0,s=this._objects.length;o +`),o},getSvgStyles:function(){var a=typeof this.opacity<"u"&&this.opacity!==1?"opacity: "+this.opacity+";":"",o=this.visible?"":" visibility: hidden;";return[a,this.getSvgFilter(),o].join("")},toClipPathSVG:function(a){for(var o=[],s=0,u=this._objects.length;s"},shouldCache:function(){return!1},isOnACache:function(){return!1},_renderControls:function(h,d,a){h.save(),h.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1,this.callSuper("_renderControls",h,d),a=a||{},typeof a.hasControls>"u"&&(a.hasControls=!1),a.forActiveSelection=!0;for(var o=0,s=this._objects.length;o `,' `,` -`),g=' clip-path="url(#imageCrop_'+p+')" '}if(this.imageSmoothing||(f='" image-rendering="optimizeSpeed'),A.push(" +`),g=' clip-path="url(#imageCrop_'+p+')" '}if(this.imageSmoothing||(f='" image-rendering="optimizeSpeed'),d.push(" `),this.stroke||this.strokeDashArray){var v=this.fill;this.fill=null,a=[" -`],this.fill=v}return this.paintFirst!=="fill"?h=h.concat(a,A):h=h.concat(A,a),h},getSrc:function(h){var A=h?this._element:this._originalElement;return A?A.toDataURL?A.toDataURL():this.srcFromAttribute?A.getAttribute("src"):A.src:this.src||""},setSrc:function(h,A,a){return t.util.loadImage(h,function(o,s){this.setElement(o,a),this._setWidthHeight(),A&&A(this,s)},this,a&&a.crossOrigin),this},toString:function(){return'#'},applyResizeFilters:function(){var h=this.resizeFilter,A=this.minimumScaleTrigger,a=this.getTotalObjectScaling(),o=a.scaleX,s=a.scaleY,u=this._filteredEl||this._originalElement;if(this.group&&this.set("dirty",!0),!h||o>A&&s>A){this._element=u,this._filterScalingX=1,this._filterScalingY=1,this._lastScaleX=o,this._lastScaleY=s;return}t.filterBackend||(t.filterBackend=t.initFilterBackend());var g=t.util.createCanvasElement(),f=this._filteredEl?this.cacheKey+"_filtered":this.cacheKey,p=u.width,v=u.height;g.width=p,g.height=v,this._element=g,this._lastScaleX=h.scaleX=o,this._lastScaleY=h.scaleY=s,t.filterBackend.applyFilters([h],u,p,v,this._element,f),this._filterScalingX=g.width/this._originalElement.width,this._filterScalingY=g.height/this._originalElement.height},applyFilters:function(h){if(h=h||this.filters||[],h=h.filter(function(u){return u&&!u.isNeutralState()}),this.set("dirty",!0),this.removeTexture(this.cacheKey+"_filtered"),h.length===0)return this._element=this._originalElement,this._filteredEl=null,this._filterScalingX=1,this._filterScalingY=1,this;var A=this._originalElement,a=A.naturalWidth||A.width,o=A.naturalHeight||A.height;if(this._element===this._originalElement){var s=t.util.createCanvasElement();s.width=a,s.height=o,this._element=s,this._filteredEl=s}else this._element=this._filteredEl,this._filteredEl.getContext("2d").clearRect(0,0,a,o),this._lastScaleX=1,this._lastScaleY=1;return t.filterBackend||(t.filterBackend=t.initFilterBackend()),t.filterBackend.applyFilters(h,this._originalElement,a,o,this._element,this.cacheKey),(this._originalElement.width!==this._element.width||this._originalElement.height!==this._element.height)&&(this._filterScalingX=this._element.width/this._originalElement.width,this._filterScalingY=this._element.height/this._originalElement.height),this},_render:function(h){t.util.setImageSmoothing(h,this.imageSmoothing),this.isMoving!==!0&&this.resizeFilter&&this._needsResize()&&this.applyResizeFilters(),this._stroke(h),this._renderPaintInOrder(h)},drawCacheOnCanvas:function(h){t.util.setImageSmoothing(h,this.imageSmoothing),t.Object.prototype.drawCacheOnCanvas.call(this,h)},shouldCache:function(){return this.needsItsOwnCache()},_renderFill:function(h){var A=this._element;if(A){var a=this._filterScalingX,o=this._filterScalingY,s=this.width,u=this.height,g=Math.min,f=Math.max,p=f(this.cropX,0),v=f(this.cropY,0),C=A.naturalWidth||A.width,y=A.naturalHeight||A.height,E=p*a,w=v*o,I=g(s*a,C-E),S=g(u*o,y-w),D=-s/2,R=-u/2,J=g(s,C/a-p),ee=g(u,y/o-v);A&&h.drawImage(A,E,w,I,S,D,R,J,ee)}},_needsResize:function(){var h=this.getTotalObjectScaling();return h.scaleX!==this._lastScaleX||h.scaleY!==this._lastScaleY},_resetWidthHeight:function(){this.set(this.getOriginalSize())},_initElement:function(h,A){this.setElement(t.util.getById(h),A),t.util.addClass(this.getElement(),t.Image.CSS_CANVAS)},_initConfig:function(h){h||(h={}),this.setOptions(h),this._setWidthHeight(h)},_initFilters:function(h,A){h&&h.length?t.util.enlivenObjects(h,function(a){A&&A(a)},"fabric.Image.filters"):A&&A()},_setWidthHeight:function(h){h||(h={});var A=this.getElement();this.width=h.width||A.naturalWidth||A.width||0,this.height=h.height||A.naturalHeight||A.height||0},parsePreserveAspectRatioAttribute:function(){var h=t.util.parsePreserveAspectRatioAttribute(this.preserveAspectRatio||""),A=this._element.width,a=this._element.height,o=1,s=1,u=0,g=0,f=0,p=0,v,C=this.width,y=this.height,E={width:C,height:y};return h&&(h.alignX!=="none"||h.alignY!=="none")?(h.meetOrSlice==="meet"&&(o=s=t.util.findScaleToFit(this._element,E),v=(C-A*o)/2,h.alignX==="Min"&&(u=-v),h.alignX==="Max"&&(u=v),v=(y-a*s)/2,h.alignY==="Min"&&(g=-v),h.alignY==="Max"&&(g=v)),h.meetOrSlice==="slice"&&(o=s=t.util.findScaleToCover(this._element,E),v=A-C/o,h.alignX==="Mid"&&(f=v/2),h.alignX==="Max"&&(f=v),v=a-y/s,h.alignY==="Mid"&&(p=v/2),h.alignY==="Max"&&(p=v),A=C/o,a=y/s)):(o=C/A,s=y/a),{width:A,height:a,scaleX:o,scaleY:s,offsetLeft:u,offsetTop:g,cropX:f,cropY:p}}}),t.Image.CSS_CANVAS="canvas-img",t.Image.prototype.getSvgSrc=t.Image.prototype.getSrc,t.Image.fromObject=function(h,A){var a=t.util.object.clone(h);t.util.loadImage(a.src,function(o,s){if(s){A&&A(null,!0);return}t.Image.prototype._initFilters.call(a,a.filters,function(u){a.filters=u||[],t.Image.prototype._initFilters.call(a,[a.resizeFilter],function(g){a.resizeFilter=g[0],t.util.enlivenObjectEnlivables(a,a,function(){var f=new t.Image(o,a);A(f,!1)})})})},null,a.crossOrigin)},t.Image.fromURL=function(h,A,a){t.util.loadImage(h,function(o,s){A&&A(new t.Image(o,a),s)},null,a&&a.crossOrigin)},t.Image.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("x y width height preserveAspectRatio xlink:href crossOrigin image-rendering".split(" ")),t.Image.fromElement=function(h,A,a){var o=t.parseAttributes(h,t.Image.ATTRIBUTE_NAMES);t.Image.fromURL(o["xlink:href"],A,i(a?t.util.object.clone(a):{},o))}}(e),t.util.object.extend(t.Object.prototype,{_getAngleValueForStraighten:function(){var c=this.angle%360;return c>0?Math.round((c-1)/90)*90:Math.round(c/90)*90},straighten:function(){return this.rotate(this._getAngleValueForStraighten())},fxStraighten:function(c){c=c||{};var i=function(){},h=c.onComplete||i,A=c.onChange||i,a=this;return t.util.animate({target:this,startValue:this.get("angle"),endValue:this._getAngleValueForStraighten(),duration:this.FX_DURATION,onChange:function(o){a.rotate(o),A()},onComplete:function(){a.setCoords(),h()}})}}),t.util.object.extend(t.StaticCanvas.prototype,{straightenObject:function(c){return c.straighten(),this.requestRenderAll(),this},fxStraightenObject:function(c){return c.fxStraighten({onChange:this.requestRenderAllBound})}}),function(){function c(h,A){var a="precision "+A+` float; -void main(){}`,o=h.createShader(h.FRAGMENT_SHADER);return h.shaderSource(o,a),h.compileShader(o),!!h.getShaderParameter(o,h.COMPILE_STATUS)}t.isWebglSupported=function(h){if(t.isLikelyNode)return!1;h=h||t.WebglFilterBackend.prototype.tileSize;var A=document.createElement("canvas"),a=A.getContext("webgl")||A.getContext("experimental-webgl"),o=!1;if(a){t.maxTextureSize=a.getParameter(a.MAX_TEXTURE_SIZE),o=t.maxTextureSize>=h;for(var s=["highp","mediump","lowp"],u=0;u<3;u++)if(c(a,s[u])){t.webGlPrecision=s[u];break}}return this.isSupported=o,o},t.WebglFilterBackend=i;function i(h){h&&h.tileSize&&(this.tileSize=h.tileSize),this.setupGLContext(this.tileSize,this.tileSize),this.captureGPUInfo()}i.prototype={tileSize:2048,resources:{},setupGLContext:function(h,A){this.dispose(),this.createWebGLCanvas(h,A),this.aPosition=new Float32Array([0,0,0,1,1,0,1,1]),this.chooseFastestCopyGLTo2DMethod(h,A)},chooseFastestCopyGLTo2DMethod:function(h,A){var a=typeof window.performance<"u",o;try{new ImageData(1,1),o=!0}catch{o=!1}var s=typeof ArrayBuffer<"u",u=typeof Uint8ClampedArray<"u";if(a&&o&&s&&u){var g=t.util.createCanvasElement(),f=new ArrayBuffer(h*A*4);if(t.forceGLPutImageData){this.imageBuffer=f,this.copyGLTo2D=m;return}var p={imageBuffer:f,destinationWidth:h,destinationHeight:A,targetCanvas:g},v,C,y;g.width=h,g.height=A,v=window.performance.now(),d.call(p,this.gl,p),C=window.performance.now()-v,v=window.performance.now(),m.call(p,this.gl,p),y=window.performance.now()-v,C>y?(this.imageBuffer=f,this.copyGLTo2D=m):this.copyGLTo2D=d}},createWebGLCanvas:function(h,A){var a=t.util.createCanvasElement();a.width=h,a.height=A;var o={alpha:!0,premultipliedAlpha:!1,depth:!1,stencil:!1,antialias:!1},s=a.getContext("webgl",o);s||(s=a.getContext("experimental-webgl",o)),s&&(s.clearColor(0,0,0,0),this.canvas=a,this.gl=s)},applyFilters:function(h,A,a,o,s,u){var g=this.gl,f;u&&(f=this.getCachedTexture(u,A));var p={originalWidth:A.width||A.originalWidth,originalHeight:A.height||A.originalHeight,sourceWidth:a,sourceHeight:o,destinationWidth:a,destinationHeight:o,context:g,sourceTexture:this.createTexture(g,a,o,!f&&A),targetTexture:this.createTexture(g,a,o),originalTexture:f||this.createTexture(g,a,o,!f&&A),passes:h.length,webgl:!0,aPosition:this.aPosition,programCache:this.programCache,pass:0,filterBackend:this,targetCanvas:s},v=g.createFramebuffer();return g.bindFramebuffer(g.FRAMEBUFFER,v),h.forEach(function(C){C&&C.applyTo(p)}),l(p),this.copyGLTo2D(g,p),g.bindTexture(g.TEXTURE_2D,null),g.deleteTexture(p.sourceTexture),g.deleteTexture(p.targetTexture),g.deleteFramebuffer(v),s.getContext("2d").setTransform(1,0,0,1,0,0),p},dispose:function(){this.canvas&&(this.canvas=null,this.gl=null),this.clearWebGLCaches()},clearWebGLCaches:function(){this.programCache={},this.textureCache={}},createTexture:function(h,A,a,o,s){var u=h.createTexture();return h.bindTexture(h.TEXTURE_2D,u),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MAG_FILTER,s||h.NEAREST),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MIN_FILTER,s||h.NEAREST),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_S,h.CLAMP_TO_EDGE),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_T,h.CLAMP_TO_EDGE),o?h.texImage2D(h.TEXTURE_2D,0,h.RGBA,h.RGBA,h.UNSIGNED_BYTE,o):h.texImage2D(h.TEXTURE_2D,0,h.RGBA,A,a,0,h.RGBA,h.UNSIGNED_BYTE,null),u},getCachedTexture:function(h,A){if(this.textureCache[h])return this.textureCache[h];var a=this.createTexture(this.gl,A.width,A.height,A);return this.textureCache[h]=a,a},evictCachesForKey:function(h){this.textureCache[h]&&(this.gl.deleteTexture(this.textureCache[h]),delete this.textureCache[h])},copyGLTo2D:d,captureGPUInfo:function(){if(this.gpuInfo)return this.gpuInfo;var h=this.gl,A={renderer:"",vendor:""};if(!h)return A;var a=h.getExtension("WEBGL_debug_renderer_info");if(a){var o=h.getParameter(a.UNMASKED_RENDERER_WEBGL),s=h.getParameter(a.UNMASKED_VENDOR_WEBGL);o&&(A.renderer=o.toLowerCase()),s&&(A.vendor=s.toLowerCase())}return this.gpuInfo=A,A}}}();function l(c){var i=c.targetCanvas,h=i.width,A=i.height,a=c.destinationWidth,o=c.destinationHeight;(h!==a||A!==o)&&(i.width=a,i.height=o)}function d(c,i){var h=c.canvas,A=i.targetCanvas,a=A.getContext("2d");a.translate(0,A.height),a.scale(1,-1);var o=h.height-A.height;a.drawImage(h,0,o,A.width,A.height,0,0,A.width,A.height)}function m(c,i){var h=i.targetCanvas,A=h.getContext("2d"),a=i.destinationWidth,o=i.destinationHeight,s=a*o*4,u=new Uint8Array(this.imageBuffer,0,s),g=new Uint8ClampedArray(this.imageBuffer,0,s);c.readPixels(0,0,a,o,c.RGBA,c.UNSIGNED_BYTE,u);var f=new ImageData(g,a,o);A.putImageData(f,0,0)}(function(){var c=function(){};t.Canvas2dFilterBackend=i;function i(){}i.prototype={evictCachesForKey:c,dispose:c,clearWebGLCaches:c,resources:{},applyFilters:function(h,A,a,o,s){var u=s.getContext("2d");u.drawImage(A,0,0,a,o);var g=u.getImageData(0,0,a,o),f=u.getImageData(0,0,a,o),p={sourceWidth:a,sourceHeight:o,imageData:g,originalEl:A,originalImageData:f,canvasEl:s,ctx:u,filterBackend:this};return h.forEach(function(v){v.applyTo(p)}),(p.imageData.width!==a||p.imageData.height!==o)&&(s.width=p.imageData.width,s.height=p.imageData.height),u.putImageData(p.imageData,0,0),p}}})(),t.Image=t.Image||{},t.Image.filters=t.Image.filters||{},t.Image.filters.BaseFilter=t.util.createClass({type:"BaseFilter",vertexSource:`attribute vec2 aPosition; +`],this.fill=v}return this.paintFirst!=="fill"?h=h.concat(a,d):h=h.concat(d,a),h},getSrc:function(h){var d=h?this._element:this._originalElement;return d?d.toDataURL?d.toDataURL():this.srcFromAttribute?d.getAttribute("src"):d.src:this.src||""},setSrc:function(h,d,a){return t.util.loadImage(h,function(o,s){this.setElement(o,a),this._setWidthHeight(),d&&d(this,s)},this,a&&a.crossOrigin),this},toString:function(){return'#'},applyResizeFilters:function(){var h=this.resizeFilter,d=this.minimumScaleTrigger,a=this.getTotalObjectScaling(),o=a.scaleX,s=a.scaleY,u=this._filteredEl||this._originalElement;if(this.group&&this.set("dirty",!0),!h||o>d&&s>d){this._element=u,this._filterScalingX=1,this._filterScalingY=1,this._lastScaleX=o,this._lastScaleY=s;return}t.filterBackend||(t.filterBackend=t.initFilterBackend());var g=t.util.createCanvasElement(),f=this._filteredEl?this.cacheKey+"_filtered":this.cacheKey,p=u.width,v=u.height;g.width=p,g.height=v,this._element=g,this._lastScaleX=h.scaleX=o,this._lastScaleY=h.scaleY=s,t.filterBackend.applyFilters([h],u,p,v,this._element,f),this._filterScalingX=g.width/this._originalElement.width,this._filterScalingY=g.height/this._originalElement.height},applyFilters:function(h){if(h=h||this.filters||[],h=h.filter(function(u){return u&&!u.isNeutralState()}),this.set("dirty",!0),this.removeTexture(this.cacheKey+"_filtered"),h.length===0)return this._element=this._originalElement,this._filteredEl=null,this._filterScalingX=1,this._filterScalingY=1,this;var d=this._originalElement,a=d.naturalWidth||d.width,o=d.naturalHeight||d.height;if(this._element===this._originalElement){var s=t.util.createCanvasElement();s.width=a,s.height=o,this._element=s,this._filteredEl=s}else this._element=this._filteredEl,this._filteredEl.getContext("2d").clearRect(0,0,a,o),this._lastScaleX=1,this._lastScaleY=1;return t.filterBackend||(t.filterBackend=t.initFilterBackend()),t.filterBackend.applyFilters(h,this._originalElement,a,o,this._element,this.cacheKey),(this._originalElement.width!==this._element.width||this._originalElement.height!==this._element.height)&&(this._filterScalingX=this._element.width/this._originalElement.width,this._filterScalingY=this._element.height/this._originalElement.height),this},_render:function(h){t.util.setImageSmoothing(h,this.imageSmoothing),this.isMoving!==!0&&this.resizeFilter&&this._needsResize()&&this.applyResizeFilters(),this._stroke(h),this._renderPaintInOrder(h)},drawCacheOnCanvas:function(h){t.util.setImageSmoothing(h,this.imageSmoothing),t.Object.prototype.drawCacheOnCanvas.call(this,h)},shouldCache:function(){return this.needsItsOwnCache()},_renderFill:function(h){var d=this._element;if(d){var a=this._filterScalingX,o=this._filterScalingY,s=this.width,u=this.height,g=Math.min,f=Math.max,p=f(this.cropX,0),v=f(this.cropY,0),C=d.naturalWidth||d.width,y=d.naturalHeight||d.height,E=p*a,w=v*o,I=g(s*a,C-E),S=g(u*o,y-w),D=-s/2,R=-u/2,J=g(s,C/a-p),ee=g(u,y/o-v);d&&h.drawImage(d,E,w,I,S,D,R,J,ee)}},_needsResize:function(){var h=this.getTotalObjectScaling();return h.scaleX!==this._lastScaleX||h.scaleY!==this._lastScaleY},_resetWidthHeight:function(){this.set(this.getOriginalSize())},_initElement:function(h,d){this.setElement(t.util.getById(h),d),t.util.addClass(this.getElement(),t.Image.CSS_CANVAS)},_initConfig:function(h){h||(h={}),this.setOptions(h),this._setWidthHeight(h)},_initFilters:function(h,d){h&&h.length?t.util.enlivenObjects(h,function(a){d&&d(a)},"fabric.Image.filters"):d&&d()},_setWidthHeight:function(h){h||(h={});var d=this.getElement();this.width=h.width||d.naturalWidth||d.width||0,this.height=h.height||d.naturalHeight||d.height||0},parsePreserveAspectRatioAttribute:function(){var h=t.util.parsePreserveAspectRatioAttribute(this.preserveAspectRatio||""),d=this._element.width,a=this._element.height,o=1,s=1,u=0,g=0,f=0,p=0,v,C=this.width,y=this.height,E={width:C,height:y};return h&&(h.alignX!=="none"||h.alignY!=="none")?(h.meetOrSlice==="meet"&&(o=s=t.util.findScaleToFit(this._element,E),v=(C-d*o)/2,h.alignX==="Min"&&(u=-v),h.alignX==="Max"&&(u=v),v=(y-a*s)/2,h.alignY==="Min"&&(g=-v),h.alignY==="Max"&&(g=v)),h.meetOrSlice==="slice"&&(o=s=t.util.findScaleToCover(this._element,E),v=d-C/o,h.alignX==="Mid"&&(f=v/2),h.alignX==="Max"&&(f=v),v=a-y/s,h.alignY==="Mid"&&(p=v/2),h.alignY==="Max"&&(p=v),d=C/o,a=y/s)):(o=C/d,s=y/a),{width:d,height:a,scaleX:o,scaleY:s,offsetLeft:u,offsetTop:g,cropX:f,cropY:p}}}),t.Image.CSS_CANVAS="canvas-img",t.Image.prototype.getSvgSrc=t.Image.prototype.getSrc,t.Image.fromObject=function(h,d){var a=t.util.object.clone(h);t.util.loadImage(a.src,function(o,s){if(s){d&&d(null,!0);return}t.Image.prototype._initFilters.call(a,a.filters,function(u){a.filters=u||[],t.Image.prototype._initFilters.call(a,[a.resizeFilter],function(g){a.resizeFilter=g[0],t.util.enlivenObjectEnlivables(a,a,function(){var f=new t.Image(o,a);d(f,!1)})})})},null,a.crossOrigin)},t.Image.fromURL=function(h,d,a){t.util.loadImage(h,function(o,s){d&&d(new t.Image(o,a),s)},null,a&&a.crossOrigin)},t.Image.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("x y width height preserveAspectRatio xlink:href crossOrigin image-rendering".split(" ")),t.Image.fromElement=function(h,d,a){var o=t.parseAttributes(h,t.Image.ATTRIBUTE_NAMES);t.Image.fromURL(o["xlink:href"],d,i(a?t.util.object.clone(a):{},o))}}(e),t.util.object.extend(t.Object.prototype,{_getAngleValueForStraighten:function(){var c=this.angle%360;return c>0?Math.round((c-1)/90)*90:Math.round(c/90)*90},straighten:function(){return this.rotate(this._getAngleValueForStraighten())},fxStraighten:function(c){c=c||{};var i=function(){},h=c.onComplete||i,d=c.onChange||i,a=this;return t.util.animate({target:this,startValue:this.get("angle"),endValue:this._getAngleValueForStraighten(),duration:this.FX_DURATION,onChange:function(o){a.rotate(o),d()},onComplete:function(){a.setCoords(),h()}})}}),t.util.object.extend(t.StaticCanvas.prototype,{straightenObject:function(c){return c.straighten(),this.requestRenderAll(),this},fxStraightenObject:function(c){return c.fxStraighten({onChange:this.requestRenderAllBound})}}),function(){function c(h,d){var a="precision "+d+` float; +void main(){}`,o=h.createShader(h.FRAGMENT_SHADER);return h.shaderSource(o,a),h.compileShader(o),!!h.getShaderParameter(o,h.COMPILE_STATUS)}t.isWebglSupported=function(h){if(t.isLikelyNode)return!1;h=h||t.WebglFilterBackend.prototype.tileSize;var d=document.createElement("canvas"),a=d.getContext("webgl")||d.getContext("experimental-webgl"),o=!1;if(a){t.maxTextureSize=a.getParameter(a.MAX_TEXTURE_SIZE),o=t.maxTextureSize>=h;for(var s=["highp","mediump","lowp"],u=0;u<3;u++)if(c(a,s[u])){t.webGlPrecision=s[u];break}}return this.isSupported=o,o},t.WebglFilterBackend=i;function i(h){h&&h.tileSize&&(this.tileSize=h.tileSize),this.setupGLContext(this.tileSize,this.tileSize),this.captureGPUInfo()}i.prototype={tileSize:2048,resources:{},setupGLContext:function(h,d){this.dispose(),this.createWebGLCanvas(h,d),this.aPosition=new Float32Array([0,0,0,1,1,0,1,1]),this.chooseFastestCopyGLTo2DMethod(h,d)},chooseFastestCopyGLTo2DMethod:function(h,d){var a=typeof window.performance<"u",o;try{new ImageData(1,1),o=!0}catch{o=!1}var s=typeof ArrayBuffer<"u",u=typeof Uint8ClampedArray<"u";if(a&&o&&s&&u){var g=t.util.createCanvasElement(),f=new ArrayBuffer(h*d*4);if(t.forceGLPutImageData){this.imageBuffer=f,this.copyGLTo2D=m;return}var p={imageBuffer:f,destinationWidth:h,destinationHeight:d,targetCanvas:g},v,C,y;g.width=h,g.height=d,v=window.performance.now(),A.call(p,this.gl,p),C=window.performance.now()-v,v=window.performance.now(),m.call(p,this.gl,p),y=window.performance.now()-v,C>y?(this.imageBuffer=f,this.copyGLTo2D=m):this.copyGLTo2D=A}},createWebGLCanvas:function(h,d){var a=t.util.createCanvasElement();a.width=h,a.height=d;var o={alpha:!0,premultipliedAlpha:!1,depth:!1,stencil:!1,antialias:!1},s=a.getContext("webgl",o);s||(s=a.getContext("experimental-webgl",o)),s&&(s.clearColor(0,0,0,0),this.canvas=a,this.gl=s)},applyFilters:function(h,d,a,o,s,u){var g=this.gl,f;u&&(f=this.getCachedTexture(u,d));var p={originalWidth:d.width||d.originalWidth,originalHeight:d.height||d.originalHeight,sourceWidth:a,sourceHeight:o,destinationWidth:a,destinationHeight:o,context:g,sourceTexture:this.createTexture(g,a,o,!f&&d),targetTexture:this.createTexture(g,a,o),originalTexture:f||this.createTexture(g,a,o,!f&&d),passes:h.length,webgl:!0,aPosition:this.aPosition,programCache:this.programCache,pass:0,filterBackend:this,targetCanvas:s},v=g.createFramebuffer();return g.bindFramebuffer(g.FRAMEBUFFER,v),h.forEach(function(C){C&&C.applyTo(p)}),l(p),this.copyGLTo2D(g,p),g.bindTexture(g.TEXTURE_2D,null),g.deleteTexture(p.sourceTexture),g.deleteTexture(p.targetTexture),g.deleteFramebuffer(v),s.getContext("2d").setTransform(1,0,0,1,0,0),p},dispose:function(){this.canvas&&(this.canvas=null,this.gl=null),this.clearWebGLCaches()},clearWebGLCaches:function(){this.programCache={},this.textureCache={}},createTexture:function(h,d,a,o,s){var u=h.createTexture();return h.bindTexture(h.TEXTURE_2D,u),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MAG_FILTER,s||h.NEAREST),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MIN_FILTER,s||h.NEAREST),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_S,h.CLAMP_TO_EDGE),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_T,h.CLAMP_TO_EDGE),o?h.texImage2D(h.TEXTURE_2D,0,h.RGBA,h.RGBA,h.UNSIGNED_BYTE,o):h.texImage2D(h.TEXTURE_2D,0,h.RGBA,d,a,0,h.RGBA,h.UNSIGNED_BYTE,null),u},getCachedTexture:function(h,d){if(this.textureCache[h])return this.textureCache[h];var a=this.createTexture(this.gl,d.width,d.height,d);return this.textureCache[h]=a,a},evictCachesForKey:function(h){this.textureCache[h]&&(this.gl.deleteTexture(this.textureCache[h]),delete this.textureCache[h])},copyGLTo2D:A,captureGPUInfo:function(){if(this.gpuInfo)return this.gpuInfo;var h=this.gl,d={renderer:"",vendor:""};if(!h)return d;var a=h.getExtension("WEBGL_debug_renderer_info");if(a){var o=h.getParameter(a.UNMASKED_RENDERER_WEBGL),s=h.getParameter(a.UNMASKED_VENDOR_WEBGL);o&&(d.renderer=o.toLowerCase()),s&&(d.vendor=s.toLowerCase())}return this.gpuInfo=d,d}}}();function l(c){var i=c.targetCanvas,h=i.width,d=i.height,a=c.destinationWidth,o=c.destinationHeight;(h!==a||d!==o)&&(i.width=a,i.height=o)}function A(c,i){var h=c.canvas,d=i.targetCanvas,a=d.getContext("2d");a.translate(0,d.height),a.scale(1,-1);var o=h.height-d.height;a.drawImage(h,0,o,d.width,d.height,0,0,d.width,d.height)}function m(c,i){var h=i.targetCanvas,d=h.getContext("2d"),a=i.destinationWidth,o=i.destinationHeight,s=a*o*4,u=new Uint8Array(this.imageBuffer,0,s),g=new Uint8ClampedArray(this.imageBuffer,0,s);c.readPixels(0,0,a,o,c.RGBA,c.UNSIGNED_BYTE,u);var f=new ImageData(g,a,o);d.putImageData(f,0,0)}(function(){var c=function(){};t.Canvas2dFilterBackend=i;function i(){}i.prototype={evictCachesForKey:c,dispose:c,clearWebGLCaches:c,resources:{},applyFilters:function(h,d,a,o,s){var u=s.getContext("2d");u.drawImage(d,0,0,a,o);var g=u.getImageData(0,0,a,o),f=u.getImageData(0,0,a,o),p={sourceWidth:a,sourceHeight:o,imageData:g,originalEl:d,originalImageData:f,canvasEl:s,ctx:u,filterBackend:this};return h.forEach(function(v){v.applyTo(p)}),(p.imageData.width!==a||p.imageData.height!==o)&&(s.width=p.imageData.width,s.height=p.imageData.height),u.putImageData(p.imageData,0,0),p}}})(),t.Image=t.Image||{},t.Image.filters=t.Image.filters||{},t.Image.filters.BaseFilter=t.util.createClass({type:"BaseFilter",vertexSource:`attribute vec2 aPosition; varying vec2 vTexCoord; void main() { vTexCoord = aPosition; @@ -107,7 +107,7 @@ varying vec2 vTexCoord; uniform sampler2D uTexture; void main() { gl_FragColor = texture2D(uTexture, vTexCoord); -}`,initialize:function(c){c&&this.setOptions(c)},setOptions:function(c){for(var i in c)this[i]=c[i]},createProgram:function(c,i,h){i=i||this.fragmentSource,h=h||this.vertexSource,t.webGlPrecision!=="highp"&&(i=i.replace(/precision highp float/g,"precision "+t.webGlPrecision+" float"));var A=c.createShader(c.VERTEX_SHADER);if(c.shaderSource(A,h),c.compileShader(A),!c.getShaderParameter(A,c.COMPILE_STATUS))throw new Error("Vertex shader compile error for "+this.type+": "+c.getShaderInfoLog(A));var a=c.createShader(c.FRAGMENT_SHADER);if(c.shaderSource(a,i),c.compileShader(a),!c.getShaderParameter(a,c.COMPILE_STATUS))throw new Error("Fragment shader compile error for "+this.type+": "+c.getShaderInfoLog(a));var o=c.createProgram();if(c.attachShader(o,A),c.attachShader(o,a),c.linkProgram(o),!c.getProgramParameter(o,c.LINK_STATUS))throw new Error('Shader link error for "${this.type}" '+c.getProgramInfoLog(o));var s=this.getAttributeLocations(c,o),u=this.getUniformLocations(c,o)||{};return u.uStepW=c.getUniformLocation(o,"uStepW"),u.uStepH=c.getUniformLocation(o,"uStepH"),{program:o,attributeLocations:s,uniformLocations:u}},getAttributeLocations:function(c,i){return{aPosition:c.getAttribLocation(i,"aPosition")}},getUniformLocations:function(){return{}},sendAttributeData:function(c,i,h){var A=i.aPosition,a=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,a),c.enableVertexAttribArray(A),c.vertexAttribPointer(A,2,c.FLOAT,!1,0,0),c.bufferData(c.ARRAY_BUFFER,h,c.STATIC_DRAW)},_setupFrameBuffer:function(c){var i=c.context,h,A;c.passes>1?(h=c.destinationWidth,A=c.destinationHeight,(c.sourceWidth!==h||c.sourceHeight!==A)&&(i.deleteTexture(c.targetTexture),c.targetTexture=c.filterBackend.createTexture(i,h,A)),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,c.targetTexture,0)):(i.bindFramebuffer(i.FRAMEBUFFER,null),i.finish())},_swapTextures:function(c){c.passes--,c.pass++;var i=c.targetTexture;c.targetTexture=c.sourceTexture,c.sourceTexture=i},isNeutralState:function(){var c=this.mainParameter,i=t.Image.filters[this.type].prototype;if(c)if(Array.isArray(i[c])){for(var h=i[c].length;h--;)if(this[c][h]!==i[c][h])return!1;return!0}else return i[c]===this[c];else return!1},applyTo:function(c){c.webgl?(this._setupFrameBuffer(c),this.applyToWebGL(c),this._swapTextures(c)):this.applyTo2d(c)},retrieveShader:function(c){return c.programCache.hasOwnProperty(this.type)||(c.programCache[this.type]=this.createProgram(c.context)),c.programCache[this.type]},applyToWebGL:function(c){var i=c.context,h=this.retrieveShader(c);c.pass===0&&c.originalTexture?i.bindTexture(i.TEXTURE_2D,c.originalTexture):i.bindTexture(i.TEXTURE_2D,c.sourceTexture),i.useProgram(h.program),this.sendAttributeData(i,h.attributeLocations,c.aPosition),i.uniform1f(h.uniformLocations.uStepW,1/c.sourceWidth),i.uniform1f(h.uniformLocations.uStepH,1/c.sourceHeight),this.sendUniformData(i,h.uniformLocations),i.viewport(0,0,c.destinationWidth,c.destinationHeight),i.drawArrays(i.TRIANGLE_STRIP,0,4)},bindAdditionalTexture:function(c,i,h){c.activeTexture(h),c.bindTexture(c.TEXTURE_2D,i),c.activeTexture(c.TEXTURE0)},unbindAdditionalTexture:function(c,i){c.activeTexture(i),c.bindTexture(c.TEXTURE_2D,null),c.activeTexture(c.TEXTURE0)},getMainParameter:function(){return this[this.mainParameter]},setMainParameter:function(c){this[this.mainParameter]=c},sendUniformData:function(){},createHelpLayer:function(c){if(!c.helpLayer){var i=document.createElement("canvas");i.width=c.sourceWidth,i.height=c.sourceHeight,c.helpLayer=i}},toObject:function(){var c={type:this.type},i=this.mainParameter;return i&&(c[i]=this[i]),c},toJSON:function(){return this.toObject()}}),t.Image.filters.BaseFilter.fromObject=function(c,i){var h=new t.Image.filters[c.type](c);return i&&i(h),h},function(c){var i=c.fabric||(c.fabric={}),h=i.Image.filters,A=i.util.createClass;h.ColorMatrix=A(h.BaseFilter,{type:"ColorMatrix",fragmentSource:`precision highp float; +}`,initialize:function(c){c&&this.setOptions(c)},setOptions:function(c){for(var i in c)this[i]=c[i]},createProgram:function(c,i,h){i=i||this.fragmentSource,h=h||this.vertexSource,t.webGlPrecision!=="highp"&&(i=i.replace(/precision highp float/g,"precision "+t.webGlPrecision+" float"));var d=c.createShader(c.VERTEX_SHADER);if(c.shaderSource(d,h),c.compileShader(d),!c.getShaderParameter(d,c.COMPILE_STATUS))throw new Error("Vertex shader compile error for "+this.type+": "+c.getShaderInfoLog(d));var a=c.createShader(c.FRAGMENT_SHADER);if(c.shaderSource(a,i),c.compileShader(a),!c.getShaderParameter(a,c.COMPILE_STATUS))throw new Error("Fragment shader compile error for "+this.type+": "+c.getShaderInfoLog(a));var o=c.createProgram();if(c.attachShader(o,d),c.attachShader(o,a),c.linkProgram(o),!c.getProgramParameter(o,c.LINK_STATUS))throw new Error('Shader link error for "${this.type}" '+c.getProgramInfoLog(o));var s=this.getAttributeLocations(c,o),u=this.getUniformLocations(c,o)||{};return u.uStepW=c.getUniformLocation(o,"uStepW"),u.uStepH=c.getUniformLocation(o,"uStepH"),{program:o,attributeLocations:s,uniformLocations:u}},getAttributeLocations:function(c,i){return{aPosition:c.getAttribLocation(i,"aPosition")}},getUniformLocations:function(){return{}},sendAttributeData:function(c,i,h){var d=i.aPosition,a=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,a),c.enableVertexAttribArray(d),c.vertexAttribPointer(d,2,c.FLOAT,!1,0,0),c.bufferData(c.ARRAY_BUFFER,h,c.STATIC_DRAW)},_setupFrameBuffer:function(c){var i=c.context,h,d;c.passes>1?(h=c.destinationWidth,d=c.destinationHeight,(c.sourceWidth!==h||c.sourceHeight!==d)&&(i.deleteTexture(c.targetTexture),c.targetTexture=c.filterBackend.createTexture(i,h,d)),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,c.targetTexture,0)):(i.bindFramebuffer(i.FRAMEBUFFER,null),i.finish())},_swapTextures:function(c){c.passes--,c.pass++;var i=c.targetTexture;c.targetTexture=c.sourceTexture,c.sourceTexture=i},isNeutralState:function(){var c=this.mainParameter,i=t.Image.filters[this.type].prototype;if(c)if(Array.isArray(i[c])){for(var h=i[c].length;h--;)if(this[c][h]!==i[c][h])return!1;return!0}else return i[c]===this[c];else return!1},applyTo:function(c){c.webgl?(this._setupFrameBuffer(c),this.applyToWebGL(c),this._swapTextures(c)):this.applyTo2d(c)},retrieveShader:function(c){return c.programCache.hasOwnProperty(this.type)||(c.programCache[this.type]=this.createProgram(c.context)),c.programCache[this.type]},applyToWebGL:function(c){var i=c.context,h=this.retrieveShader(c);c.pass===0&&c.originalTexture?i.bindTexture(i.TEXTURE_2D,c.originalTexture):i.bindTexture(i.TEXTURE_2D,c.sourceTexture),i.useProgram(h.program),this.sendAttributeData(i,h.attributeLocations,c.aPosition),i.uniform1f(h.uniformLocations.uStepW,1/c.sourceWidth),i.uniform1f(h.uniformLocations.uStepH,1/c.sourceHeight),this.sendUniformData(i,h.uniformLocations),i.viewport(0,0,c.destinationWidth,c.destinationHeight),i.drawArrays(i.TRIANGLE_STRIP,0,4)},bindAdditionalTexture:function(c,i,h){c.activeTexture(h),c.bindTexture(c.TEXTURE_2D,i),c.activeTexture(c.TEXTURE0)},unbindAdditionalTexture:function(c,i){c.activeTexture(i),c.bindTexture(c.TEXTURE_2D,null),c.activeTexture(c.TEXTURE0)},getMainParameter:function(){return this[this.mainParameter]},setMainParameter:function(c){this[this.mainParameter]=c},sendUniformData:function(){},createHelpLayer:function(c){if(!c.helpLayer){var i=document.createElement("canvas");i.width=c.sourceWidth,i.height=c.sourceHeight,c.helpLayer=i}},toObject:function(){var c={type:this.type},i=this.mainParameter;return i&&(c[i]=this[i]),c},toJSON:function(){return this.toObject()}}),t.Image.filters.BaseFilter.fromObject=function(c,i){var h=new t.Image.filters[c.type](c);return i&&i(h),h},function(c){var i=c.fabric||(c.fabric={}),h=i.Image.filters,d=i.util.createClass;h.ColorMatrix=d(h.BaseFilter,{type:"ColorMatrix",fragmentSource:`precision highp float; uniform sampler2D uTexture; varying vec2 vTexCoord; uniform mat4 uColorMatrix; @@ -117,7 +117,7 @@ vec4 color = texture2D(uTexture, vTexCoord); color *= uColorMatrix; color += uConstants; gl_FragColor = color; -}`,matrix:[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],mainParameter:"matrix",colorsOnly:!0,initialize:function(a){this.callSuper("initialize",a),this.matrix=this.matrix.slice(0)},applyTo2d:function(a){var o=a.imageData,s=o.data,u=s.length,g=this.matrix,f,p,v,C,y,E=this.colorsOnly;for(y=0;y=C||ee<0||ee>=v)&&(te=(Z*v+ee)*4,re=g[B*f+L],I+=u[te]*re,S+=u[te+1]*re,D+=u[te+2]*re,w||(R+=u[te+3]*re));E[J]=I,E[J+1]=S,E[J+2]=D,w?E[J+3]=u[J+3]:E[J+3]=R}o.imageData=y},getUniformLocations:function(o,s){return{uMatrix:o.getUniformLocation(s,"uMatrix"),uOpaque:o.getUniformLocation(s,"uOpaque"),uHalfSize:o.getUniformLocation(s,"uHalfSize"),uSize:o.getUniformLocation(s,"uSize")}},sendUniformData:function(o,s){o.uniform1fv(s.uMatrix,this.matrix)},toObject:function(){return h(this.callSuper("toObject"),{opaque:this.opaque,matrix:this.matrix})}}),i.Image.filters.Convolute.fromObject=i.Image.filters.BaseFilter.fromObject}(e),function(c){var i=c.fabric||(c.fabric={}),h=i.Image.filters,A=i.util.createClass;h.Grayscale=A(h.BaseFilter,{type:"Grayscale",fragmentSource:{average:`precision highp float; +}`},retrieveShader:function(o){var s=Math.sqrt(this.matrix.length),u=this.type+"_"+s+"_"+(this.opaque?1:0),g=this.fragmentSource[u];return o.programCache.hasOwnProperty(u)||(o.programCache[u]=this.createProgram(o.context,g)),o.programCache[u]},applyTo2d:function(o){var s=o.imageData,u=s.data,g=this.matrix,f=Math.round(Math.sqrt(g.length)),p=Math.floor(f/2),v=s.width,C=s.height,y=o.ctx.createImageData(v,C),E=y.data,w=this.opaque?1:0,I,S,D,R,J,ee,Z,te,re,oe,H,L,B;for(H=0;H=C||ee<0||ee>=v)&&(te=(Z*v+ee)*4,re=g[B*f+L],I+=u[te]*re,S+=u[te+1]*re,D+=u[te+2]*re,w||(R+=u[te+3]*re));E[J]=I,E[J+1]=S,E[J+2]=D,w?E[J+3]=u[J+3]:E[J+3]=R}o.imageData=y},getUniformLocations:function(o,s){return{uMatrix:o.getUniformLocation(s,"uMatrix"),uOpaque:o.getUniformLocation(s,"uOpaque"),uHalfSize:o.getUniformLocation(s,"uHalfSize"),uSize:o.getUniformLocation(s,"uSize")}},sendUniformData:function(o,s){o.uniform1fv(s.uMatrix,this.matrix)},toObject:function(){return h(this.callSuper("toObject"),{opaque:this.opaque,matrix:this.matrix})}}),i.Image.filters.Convolute.fromObject=i.Image.filters.BaseFilter.fromObject}(e),function(c){var i=c.fabric||(c.fabric={}),h=i.Image.filters,d=i.util.createClass;h.Grayscale=d(h.BaseFilter,{type:"Grayscale",fragmentSource:{average:`precision highp float; uniform sampler2D uTexture; varying vec2 vTexCoord; void main() { @@ -276,7 +276,7 @@ void main() { vec4 col = texture2D(uTexture, vTexCoord); float average = 0.21 * col.r + 0.72 * col.g + 0.07 * col.b; gl_FragColor = vec4(average, average, average, col.a); -}`},mode:"average",mainParameter:"mode",applyTo2d:function(a){var o=a.imageData,s=o.data,u,g=s.length,f,p=this.mode;for(u=0;uE[0]&&v>E[1]&&C>E[2]&&pE[0]&&v>E[1]&&C>E[2]&&p 0.0) { `+this.fragmentSource[a]+`} -}`},retrieveShader:function(a){var o=this.type+"_"+this.mode,s;return a.programCache.hasOwnProperty(o)||(s=this.buildSource(this.mode),a.programCache[o]=this.createProgram(a.context,s)),a.programCache[o]},applyTo2d:function(a){var o=a.imageData,s=o.data,u=s.length,g,f,p,v,C,y,E,w=1-this.alpha;E=new i.Color(this.color).getSource(),g=E[0]*this.alpha,f=E[1]*this.alpha,p=E[2]*this.alpha;for(var I=0;I=v||C<=-v)return 0;if(C<11920929e-14&&C>-11920929e-14)return 1;C*=Math.PI;var y=C/v;return u(C)/C*u(y)/y}},applyTo2d:function(v){var C=v.imageData,y=this.scaleX,E=this.scaleY;this.rcpScaleX=1/y,this.rcpScaleY=1/E;var w=C.width,I=C.height,S=s(w*y),D=s(I*E),R;this.resizeType==="sliceHack"?R=this.sliceByTwo(v,w,I,S,D):this.resizeType==="hermite"?R=this.hermiteFastResize(v,w,I,S,D):this.resizeType==="bilinear"?R=this.bilinearFiltering(v,w,I,S,D):this.resizeType==="lanczos"&&(R=this.lanczosResize(v,w,I,S,D)),v.imageData=R},sliceByTwo:function(v,C,y,E,w){var I=v.imageData,S=.5,D=!1,R=!1,J=C*S,ee=y*S,Z=i.filterBackend.resources,te,re,oe=0,H=0,L=C,B=0;for(Z.sliceByTwo||(Z.sliceByTwo=document.createElement("canvas")),te=Z.sliceByTwo,(te.width=C)){q=A(1e3*o(M-B.x)),L[q]||(L[q]={});for(var G=b.y-H;G<=b.y+H;G++)G<0||G>=y||(ie=A(1e3*o(G-B.y)),L[q][ie]||(L[q][ie]=J(a(h(q*te,2)+h(ie*re,2))/1e3)),_=L[q][ie],_>0&&(x=(G*C+M)*4,O+=_,F+=_*S[x],$+=_*S[x+1],N+=_*S[x+2],X+=_*S[x+3]))}x=(T*E+Q)*4,R[x]=F/O,R[x+1]=$/O,R[x+2]=N/O,R[x+3]=X/O}return++Q1&&ie<-1||(L=2*ie*ie*ie-3*ie*ie+1,L>0&&(q=4*(X+O*C),_+=L*ee[q+3],b+=L,ee[q+3]<255&&(L=L*ee[q+3]/250),Q+=L*ee[q],T+=L*ee[q+1],M+=L*ee[q+2],B+=L))}te[H]=Q/B,te[H+1]=T/B,te[H+2]=M/B,te[H+3]=_/b}return Z},toObject:function(){return{type:this.type,scaleX:this.scaleX,scaleY:this.scaleY,resizeType:this.resizeType,lanczosLobes:this.lanczosLobes}}}),i.Image.filters.Resize.fromObject=i.Image.filters.BaseFilter.fromObject}(e),function(c){var i=c.fabric||(c.fabric={}),h=i.Image.filters,A=i.util.createClass;h.Contrast=A(h.BaseFilter,{type:"Contrast",fragmentSource:`precision highp float; +`,applyTo:function(v){v.webgl?(v.passes++,this.width=v.sourceWidth,this.horizontal=!0,this.dW=Math.round(this.width*this.scaleX),this.dH=v.sourceHeight,this.tempScale=this.dW/this.width,this.taps=this.getTaps(),v.destinationWidth=this.dW,this._setupFrameBuffer(v),this.applyToWebGL(v),this._swapTextures(v),v.sourceWidth=v.destinationWidth,this.height=v.sourceHeight,this.horizontal=!1,this.dH=Math.round(this.height*this.scaleY),this.tempScale=this.dH/this.height,this.taps=this.getTaps(),v.destinationHeight=this.dH,this._setupFrameBuffer(v),this.applyToWebGL(v),this._swapTextures(v),v.sourceHeight=v.destinationHeight):this.applyTo2d(v)},isNeutralState:function(){return this.scaleX===1&&this.scaleY===1},lanczosCreate:function(v){return function(C){if(C>=v||C<=-v)return 0;if(C<11920929e-14&&C>-11920929e-14)return 1;C*=Math.PI;var y=C/v;return u(C)/C*u(y)/y}},applyTo2d:function(v){var C=v.imageData,y=this.scaleX,E=this.scaleY;this.rcpScaleX=1/y,this.rcpScaleY=1/E;var w=C.width,I=C.height,S=s(w*y),D=s(I*E),R;this.resizeType==="sliceHack"?R=this.sliceByTwo(v,w,I,S,D):this.resizeType==="hermite"?R=this.hermiteFastResize(v,w,I,S,D):this.resizeType==="bilinear"?R=this.bilinearFiltering(v,w,I,S,D):this.resizeType==="lanczos"&&(R=this.lanczosResize(v,w,I,S,D)),v.imageData=R},sliceByTwo:function(v,C,y,E,w){var I=v.imageData,S=.5,D=!1,R=!1,J=C*S,ee=y*S,Z=i.filterBackend.resources,te,re,oe=0,H=0,L=C,B=0;for(Z.sliceByTwo||(Z.sliceByTwo=document.createElement("canvas")),te=Z.sliceByTwo,(te.width=C)){q=d(1e3*o(M-B.x)),L[q]||(L[q]={});for(var G=b.y-H;G<=b.y+H;G++)G<0||G>=y||(ie=d(1e3*o(G-B.y)),L[q][ie]||(L[q][ie]=J(a(h(q*te,2)+h(ie*re,2))/1e3)),_=L[q][ie],_>0&&(x=(G*C+M)*4,O+=_,F+=_*S[x],$+=_*S[x+1],N+=_*S[x+2],X+=_*S[x+3]))}x=(T*E+Q)*4,R[x]=F/O,R[x+1]=$/O,R[x+2]=N/O,R[x+3]=X/O}return++Q1&&ie<-1||(L=2*ie*ie*ie-3*ie*ie+1,L>0&&(q=4*(X+O*C),_+=L*ee[q+3],b+=L,ee[q+3]<255&&(L=L*ee[q+3]/250),Q+=L*ee[q],T+=L*ee[q+1],M+=L*ee[q+2],B+=L))}te[H]=Q/B,te[H+1]=T/B,te[H+2]=M/B,te[H+3]=_/b}return Z},toObject:function(){return{type:this.type,scaleX:this.scaleX,scaleY:this.scaleY,resizeType:this.resizeType,lanczosLobes:this.lanczosLobes}}}),i.Image.filters.Resize.fromObject=i.Image.filters.BaseFilter.fromObject}(e),function(c){var i=c.fabric||(c.fabric={}),h=i.Image.filters,d=i.util.createClass;h.Contrast=d(h.BaseFilter,{type:"Contrast",fragmentSource:`precision highp float; uniform sampler2D uTexture; uniform float uContrast; varying vec2 vTexCoord; @@ -411,7 +411,7 @@ vec4 color = texture2D(uTexture, vTexCoord); float contrastF = 1.015 * (uContrast + 1.0) / (1.0 * (1.015 - uContrast)); color.rgb = contrastF * (color.rgb - 0.5) + 0.5; gl_FragColor = color; -}`,contrast:0,mainParameter:"contrast",applyTo2d:function(a){if(this.contrast!==0){var o=a.imageData,s,g,u=o.data,g=u.length,f=Math.floor(this.contrast*255),p=259*(f+255)/(255*(259-f));for(s=0;s1&&(a=1/this.aspectRatio):this.aspectRatio<1&&(a=this.aspectRatio),s=a*this.blur*.12,this.horizontal?o[0]=s:o[1]=s,o}}),h.Blur.fromObject=i.Image.filters.BaseFilter.fromObject}(e),function(c){var i=c.fabric||(c.fabric={}),h=i.Image.filters,A=i.util.createClass;h.Gamma=A(h.BaseFilter,{type:"Gamma",fragmentSource:`precision highp float; +}`,blur:0,mainParameter:"blur",applyTo:function(a){a.webgl?(this.aspectRatio=a.sourceWidth/a.sourceHeight,a.passes++,this._setupFrameBuffer(a),this.horizontal=!0,this.applyToWebGL(a),this._swapTextures(a),this._setupFrameBuffer(a),this.horizontal=!1,this.applyToWebGL(a),this._swapTextures(a)):this.applyTo2d(a)},applyTo2d:function(a){a.imageData=this.simpleBlur(a)},simpleBlur:function(a){var o=a.filterBackend.resources,s,u,g=a.imageData.width,f=a.imageData.height;o.blurLayer1||(o.blurLayer1=i.util.createCanvasElement(),o.blurLayer2=i.util.createCanvasElement()),s=o.blurLayer1,u=o.blurLayer2,(s.width!==g||s.height!==f)&&(u.width=s.width=g,u.height=s.height=f);var p=s.getContext("2d"),v=u.getContext("2d"),C=15,y,E,w,I,S=this.blur*.06*.5;for(p.putImageData(a.imageData,0,0),v.clearRect(0,0,g,f),I=-C;I<=C;I++)y=(Math.random()-.5)/4,E=I/C,w=S*E*g+y,v.globalAlpha=1-Math.abs(E),v.drawImage(s,w,y),p.drawImage(u,0,0),v.globalAlpha=1,v.clearRect(0,0,u.width,u.height);for(I=-C;I<=C;I++)y=(Math.random()-.5)/4,E=I/C,w=S*E*f+y,v.globalAlpha=1-Math.abs(E),v.drawImage(s,y,w),p.drawImage(u,0,0),v.globalAlpha=1,v.clearRect(0,0,u.width,u.height);a.ctx.drawImage(s,0,0);var D=a.ctx.getImageData(0,0,s.width,s.height);return p.globalAlpha=1,p.clearRect(0,0,s.width,s.height),D},getUniformLocations:function(a,o){return{delta:a.getUniformLocation(o,"uDelta")}},sendUniformData:function(a,o){var s=this.chooseRightDelta();a.uniform2fv(o.delta,s)},chooseRightDelta:function(){var a=1,o=[0,0],s;return this.horizontal?this.aspectRatio>1&&(a=1/this.aspectRatio):this.aspectRatio<1&&(a=this.aspectRatio),s=a*this.blur*.12,this.horizontal?o[0]=s:o[1]=s,o}}),h.Blur.fromObject=i.Image.filters.BaseFilter.fromObject}(e),function(c){var i=c.fabric||(c.fabric={}),h=i.Image.filters,d=i.util.createClass;h.Gamma=d(h.BaseFilter,{type:"Gamma",fragmentSource:`precision highp float; uniform sampler2D uTexture; uniform vec3 uGamma; varying vec2 vTexCoord; @@ -468,18 +468,18 @@ color.g = pow(color.g, correction.g); color.b = pow(color.b, correction.b); gl_FragColor = color; gl_FragColor.rgb *= color.a; -}`,gamma:[1,1,1],mainParameter:"gamma",initialize:function(a){this.gamma=[1,1,1],h.BaseFilter.prototype.initialize.call(this,a)},applyTo2d:function(a){var o=a.imageData,s=o.data,u=this.gamma,g=s.length,f=1/u[0],p=1/u[1],v=1/u[2],C;for(this.rVals||(this.rVals=new Uint8Array(256),this.gVals=new Uint8Array(256),this.bVals=new Uint8Array(256)),C=0,g=256;C'},_getCacheCanvasDimensions:function(){var a=this.callSuper("_getCacheCanvasDimensions"),o=this.fontSize;return a.width+=o*a.zoomX,a.height+=o*a.zoomY,a},_render:function(a){var o=this.path;o&&!o.isNotVisible()&&o._render(a),this._setTextStyles(a),this._renderTextLinesBackground(a),this._renderTextDecoration(a,"underline"),this._renderText(a),this._renderTextDecoration(a,"overline"),this._renderTextDecoration(a,"linethrough")},_renderText:function(a){this.paintFirst==="stroke"?(this._renderTextStroke(a),this._renderTextFill(a)):(this._renderTextFill(a),this._renderTextStroke(a))},_setTextStyles:function(a,o,s){if(a.textBaseline="alphabetical",this.path)switch(this.pathAlign){case"center":a.textBaseline="middle";break;case"ascender":a.textBaseline="top";break;case"descender":a.textBaseline="bottom";break}a.font=this._getFontDeclaration(o,s)},calcTextWidth:function(){for(var a=this.getLineWidth(0),o=1,s=this._textLines.length;oa&&(a=u)}return a},_renderTextLine:function(a,o,s,u,g,f){this._renderChars(a,o,s,u,g,f)},_renderTextLinesBackground:function(a){if(!(!this.textBackgroundColor&&!this.styleHas("textBackgroundColor"))){for(var o,s,u=a.fillStyle,g,f,p=this._getLeftOffset(),v=this._getTopOffset(),C=0,y=0,E,w,I=this.path,S,D=0,R=this._textLines.length;D=0:sw?y%=w:y<0&&(y+=w),this._setGraphemeOnPath(y,p,E),y+=p.kernedWidth}return{width:o,numOfSpaces:v}},_setGraphemeOnPath:function(a,o,s){var u=a+o.kernedWidth/2,g=this.path,f=i.util.getPointOnPath(g.path,u,g.segmentsInfo);o.renderLeft=f.x-s.x,o.renderTop=f.y-s.y,o.angle=f.angle+(this.pathSide==="right"?Math.PI:0)},_getGraphemeBox:function(a,o,s,u,g){var f=this.getCompleteStyleDeclaration(o,s),p=u?this.getCompleteStyleDeclaration(o,s-1):{},v=this._measureChar(a,f,u,p),C=v.kernedWidth,y=v.width,E;this.charSpacing!==0&&(E=this._getWidthOfCharSpacing(),y+=E,C+=E);var w={width:y,left:0,height:f.fontSize,kernedWidth:C,deltaY:f.deltaY};if(s>0&&!g){var I=this.__charBounds[o][s-1];w.left=I.left+I.width+v.kernedWidth-v.width}return w},getHeightOfLine:function(a){if(this.__lineHeights[a])return this.__lineHeights[a];for(var o=this._textLines[a],s=this.getHeightOfChar(a,0),u=1,g=o.length;u0){var T=E+f+S;this.direction==="rtl"&&(T=this.width-T-D),y&&te&&(a.fillStyle=te,a.fillRect(T,I+H*u+p,D,this.fontSize/15)),S=R.left,D=R.width,y=J,te=Z,u=g,p=v}else D+=R.kernedWidth;var T=E+f+S;this.direction==="rtl"&&(T=this.width-T-D),a.fillStyle=Z,J&&Z&&a.fillRect(T,I+H*u+p,D-oe,this.fontSize/15),w+=s}this._removeShadow(a)}},_getFontDeclaration:function(a,o){var s=a||this,u=this.fontFamily,g=i.Text.genericFonts.indexOf(u.toLowerCase())>-1,f=u===void 0||u.indexOf("'")>-1||u.indexOf(",")>-1||u.indexOf('"')>-1||g?s.fontFamily:'"'+s.fontFamily+'"';return[i.isLikelyNode?s.fontWeight:s.fontStyle,i.isLikelyNode?s.fontStyle:s.fontWeight,o?this.CACHE_FONT_SIZE+"px":s.fontSize+"px",f].join(" ")},render:function(a){this.visible&&(this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(this._shouldClearDimensionCache()&&this.initDimensions(),this.callSuper("render",a)))},_splitTextIntoLines:function(a){for(var o=a.split(this._reNewline),s=new Array(o.length),u=[` -`],g=[],f=0;f"u"?this.styles:{line:this.styles[c]};for(var h in i)for(var A in i[h])for(var a in i[h][A])return!1;return!0},styleHas:function(c,i){if(!this.styles||!c||c===""||typeof i<"u"&&!this.styles[i])return!1;var h=typeof i>"u"?this.styles:{0:this.styles[i]};for(var A in h)for(var a in h[A])if(typeof h[A][a][c]<"u")return!0;return!1},cleanStyle:function(c){if(!this.styles||!c||c==="")return!1;var i=this.styles,h=0,A,a,o=!0,s=0,u;for(var g in i){A=0;for(var f in i[g]){var u=i[g][f],p=u.hasOwnProperty(c);h++,p?(a?u[c]!==a&&(o=!1):a=u[c],u[c]===this[c]&&delete u[c]):o=!1,Object.keys(u).length!==0?A++:delete i[g][f]}A===0&&delete i[g]}for(var v=0;v"u"&&(c=this.selectionStart);for(var h=i?this._unwrappedTextLines:this._textLines,A=h.length,a=0;a"u"&&(c=this.selectionStart||0),typeof i>"u"&&(i=this.selectionEnd||c);for(var A=[],a=c;a"u"&&(i=this.selectionStart||0),typeof h>"u"&&(h=this.selectionEnd||i);for(var A=i;A"u"?this[a]:h[a];return A},_setStyleDeclaration:function(c,i,h){this.styles[c][i]=h},_deleteStyleDeclaration:function(c,i){delete this.styles[c][i]},_getLineStyle:function(c){return!!this.styles[c]},_setLineStyle:function(c){this.styles[c]={}},_deleteLineStyle:function(c){delete this.styles[c]}})}(),function(){function c(i){i.textDecoration&&(i.textDecoration.indexOf("underline")>-1&&(i.underline=!0),i.textDecoration.indexOf("line-through")>-1&&(i.linethrough=!0),i.textDecoration.indexOf("overline")>-1&&(i.overline=!0),delete i.textDecoration)}t.IText=t.util.createClass(t.Text,t.Observable,{type:"i-text",selectionStart:0,selectionEnd:0,selectionColor:"rgba(17,119,255,0.3)",isEditing:!1,editable:!0,editingBorderColor:"rgba(102,153,255,0.25)",cursorWidth:2,cursorColor:"",cursorDelay:1e3,cursorDuration:600,caching:!0,hiddenTextareaContainer:null,_reSpace:/\s|\n/,_currentCursorOpacity:0,_selectionDirection:null,_abortCursorAnimation:!1,__widthOfSpace:[],inCompositionMode:!1,initialize:function(i,h){this.callSuper("initialize",i,h),this.initBehavior()},setSelectionStart:function(i){i=Math.max(i,0),this._updateAndFire("selectionStart",i)},setSelectionEnd:function(i){i=Math.min(i,this.text.length),this._updateAndFire("selectionEnd",i)},_updateAndFire:function(i,h){this[i]!==h&&(this._fireSelectionChanged(),this[i]=h),this._updateTextarea()},_fireSelectionChanged:function(){this.fire("selection:changed"),this.canvas&&this.canvas.fire("text:selection:changed",{target:this})},initDimensions:function(){this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this.callSuper("initDimensions")},render:function(i){this.clearContextTop(),this.callSuper("render",i),this.cursorOffsetCache={},this.renderCursorOrSelection()},_render:function(i){this.callSuper("_render",i)},clearContextTop:function(i){if(!(!this.isEditing||!this.canvas||!this.canvas.contextTop)){var h=this.canvas.contextTop,A=this.canvas.viewportTransform;h.save(),h.transform(A[0],A[1],A[2],A[3],A[4],A[5]),this.transform(h),this._clearTextArea(h),i||h.restore()}},renderCursorOrSelection:function(){if(!(!this.isEditing||!this.canvas||!this.canvas.contextTop)){var i=this._getCursorBoundaries(),h=this.canvas.contextTop;this.clearContextTop(!0),this.selectionStart===this.selectionEnd?this.renderCursor(i,h):this.renderSelection(i,h),h.restore()}},_clearTextArea:function(i){var h=this.width+4,A=this.height+4;i.clearRect(-h/2,-A/2,h,A)},_getCursorBoundaries:function(i){typeof i>"u"&&(i=this.selectionStart);var h=this._getLeftOffset(),A=this._getTopOffset(),a=this._getCursorBoundariesOffsets(i);return{left:h,top:A,leftOffset:a.left,topOffset:a.top}},_getCursorBoundariesOffsets:function(i){if(this.cursorOffsetCache&&"top"in this.cursorOffsetCache)return this.cursorOffsetCache;var h,A,a,o=0,s=0,u,g=this.get2DCursorLocation(i);a=g.charIndex,A=g.lineIndex;for(var f=0;f0?s:0)},this.direction==="rtl"&&(u.left*=-1),this.cursorOffsetCache=u,this.cursorOffsetCache},renderCursor:function(i,h){var A=this.get2DCursorLocation(),a=A.lineIndex,o=A.charIndex>0?A.charIndex-1:0,s=this.getValueOfPropertyAt(a,o,"fontSize"),u=this.scaleX*this.canvas.getZoom(),g=this.cursorWidth/u,f=i.topOffset,p=this.getValueOfPropertyAt(a,o,"deltaY");f+=(1-this._fontSizeFraction)*this.getHeightOfLine(a)/this.lineHeight-s*(1-this._fontSizeFraction),this.inCompositionMode&&this.renderSelection(i,h),h.fillStyle=this.cursorColor||this.getValueOfPropertyAt(a,o,"fill"),h.globalAlpha=this.__isMousedown?1:this._currentCursorOpacity,h.fillRect(i.left+i.leftOffset-g/2,f+i.top+p,g,s)},renderSelection:function(i,h){for(var A=this.inCompositionMode?this.hiddenTextarea.selectionStart:this.selectionStart,a=this.inCompositionMode?this.hiddenTextarea.selectionEnd:this.selectionEnd,o=this.textAlign.indexOf("justify")!==-1,s=this.get2DCursorLocation(A),u=this.get2DCursorLocation(a),g=s.lineIndex,f=u.lineIndex,p=s.charIndex<0?0:s.charIndex,v=u.charIndex<0?0:u.charIndex,C=g;C<=f;C++){var y=this._getLineLeftOffset(C)||0,E=this.getHeightOfLine(C),w=0,I=0,S=0;if(C===g&&(I=this.__charBounds[g][p].left),C>=g&&C1)&&(E/=this.lineHeight);var R=i.left+y+I,J=S-I,ee=E,Z=0;this.inCompositionMode?(h.fillStyle=this.compositionColor||"black",ee=1,Z=E):h.fillStyle=this.selectionColor,this.direction==="rtl"&&(R=this.width-R-J),h.fillRect(R,i.top+i.topOffset+Z,J,ee),i.topOffset+=w}},getCurrentCharFontSize:function(){var i=this._getCurrentCharIndex();return this.getValueOfPropertyAt(i.l,i.c,"fontSize")},getCurrentCharColor:function(){var i=this._getCurrentCharIndex();return this.getValueOfPropertyAt(i.l,i.c,"fill")},_getCurrentCharIndex:function(){var i=this.get2DCursorLocation(this.selectionStart,!0),h=i.charIndex>0?i.charIndex-1:0;return{l:i.lineIndex,c:h}}}),t.IText.fromObject=function(i,h){var A=t.util.stylesFromArray(i.styles,i.text),a=Object.assign({},i,{styles:A});if(c(a),a.styles)for(var o in a.styles)for(var s in a.styles[o])c(a.styles[o][s]);t.Object._fromObject("IText",a,h,"text")}}(),function(){var c=t.util.object.clone;t.util.object.extend(t.IText.prototype,{initBehavior:function(){this.initAddedHandler(),this.initRemovedHandler(),this.initCursorSelectionHandlers(),this.initDoubleClickSimulation(),this.mouseMoveHandler=this.mouseMoveHandler.bind(this)},onDeselect:function(){this.isEditing&&this.exitEditing(),this.selected=!1},initAddedHandler:function(){var i=this;this.on("added",function(){var h=i.canvas;h&&(h._hasITextHandlers||(h._hasITextHandlers=!0,i._initCanvasHandlers(h)),h._iTextInstances=h._iTextInstances||[],h._iTextInstances.push(i))})},initRemovedHandler:function(){var i=this;this.on("removed",function(){var h=i.canvas;h&&(h._iTextInstances=h._iTextInstances||[],t.util.removeFromArray(h._iTextInstances,i),h._iTextInstances.length===0&&(h._hasITextHandlers=!1,i._removeCanvasHandlers(h)))})},_initCanvasHandlers:function(i){i._mouseUpITextHandler=function(){i._iTextInstances&&i._iTextInstances.forEach(function(h){h.__isMousedown=!1})},i.on("mouse:up",i._mouseUpITextHandler)},_removeCanvasHandlers:function(i){i.off("mouse:up",i._mouseUpITextHandler)},_tick:function(){this._currentTickState=this._animateCursor(this,1,this.cursorDuration,"_onTickComplete")},_animateCursor:function(i,h,A,a){var o;return o={isAborted:!1,abort:function(){this.isAborted=!0}},i.animate("_currentCursorOpacity",h,{duration:A,onComplete:function(){o.isAborted||i[a]()},onChange:function(){i.canvas&&i.selectionStart===i.selectionEnd&&i.renderCursorOrSelection()},abort:function(){return o.isAborted}}),o},_onTickComplete:function(){var i=this;this._cursorTimeout1&&clearTimeout(this._cursorTimeout1),this._cursorTimeout1=setTimeout(function(){i._currentTickCompleteState=i._animateCursor(i,0,this.cursorDuration/2,"_tick")},100)},initDelayedCursor:function(i){var h=this,A=i?0:this.cursorDelay;this.abortCursorAnimation(),this._currentCursorOpacity=1,this._cursorTimeout2=setTimeout(function(){h._tick()},A)},abortCursorAnimation:function(){var i=this._currentTickState||this._currentTickCompleteState,h=this.canvas;this._currentTickState&&this._currentTickState.abort(),this._currentTickCompleteState&&this._currentTickCompleteState.abort(),clearTimeout(this._cursorTimeout1),clearTimeout(this._cursorTimeout2),this._currentCursorOpacity=0,i&&h&&h.clearContext(h.contextTop||h.contextContainer)},selectAll:function(){return this.selectionStart=0,this.selectionEnd=this._text.length,this._fireSelectionChanged(),this._updateTextarea(),this},getSelectedText:function(){return this._text.slice(this.selectionStart,this.selectionEnd).join("")},findWordBoundaryLeft:function(i){var h=0,A=i-1;if(this._reSpace.test(this._text[A]))for(;this._reSpace.test(this._text[A]);)h++,A--;for(;/\S/.test(this._text[A])&&A>-1;)h++,A--;return i-h},findWordBoundaryRight:function(i){var h=0,A=i;if(this._reSpace.test(this._text[A]))for(;this._reSpace.test(this._text[A]);)h++,A++;for(;/\S/.test(this._text[A])&&A-1;)h++,A--;return i-h},findLineBoundaryRight:function(i){for(var h=0,A=i;!/\n/.test(this._text[A])&&A0&&athis.__selectionStartOnMouseDown?(this.selectionStart=this.__selectionStartOnMouseDown,this.selectionEnd=h):(this.selectionStart=h,this.selectionEnd=this.__selectionStartOnMouseDown),(this.selectionStart!==A||this.selectionEnd!==a)&&(this.restartCursorIfNeeded(),this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()))}},_setEditingProps:function(){this.hoverCursor="text",this.canvas&&(this.canvas.defaultCursor=this.canvas.moveCursor="text"),this.borderColor=this.editingBorderColor,this.hasControls=this.selectable=!1,this.lockMovementX=this.lockMovementY=!0},fromStringToGraphemeSelection:function(i,h,A){var a=A.slice(0,i),o=t.util.string.graphemeSplit(a).length;if(i===h)return{selectionStart:o,selectionEnd:o};var s=A.slice(i,h),u=t.util.string.graphemeSplit(s).length;return{selectionStart:o,selectionEnd:o+u}},fromGraphemeToStringSelection:function(i,h,A){var a=A.slice(0,i),o=a.join("").length;if(i===h)return{selectionStart:o,selectionEnd:o};var s=A.slice(i,h),u=s.join("").length;return{selectionStart:o,selectionEnd:o+u}},_updateTextarea:function(){if(this.cursorOffsetCache={},!!this.hiddenTextarea){if(!this.inCompositionMode){var i=this.fromGraphemeToStringSelection(this.selectionStart,this.selectionEnd,this._text);this.hiddenTextarea.selectionStart=i.selectionStart,this.hiddenTextarea.selectionEnd=i.selectionEnd}this.updateTextareaPosition()}},updateFromTextArea:function(){if(this.hiddenTextarea){this.cursorOffsetCache={},this.text=this.hiddenTextarea.value,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords());var i=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value);this.selectionEnd=this.selectionStart=i.selectionEnd,this.inCompositionMode||(this.selectionStart=i.selectionStart),this.updateTextareaPosition()}},updateTextareaPosition:function(){if(this.selectionStart===this.selectionEnd){var i=this._calcTextareaPosition();this.hiddenTextarea.style.left=i.left,this.hiddenTextarea.style.top=i.top}},_calcTextareaPosition:function(){if(!this.canvas)return{x:1,y:1};var i=this.inCompositionMode?this.compositionStart:this.selectionStart,h=this._getCursorBoundaries(i),A=this.get2DCursorLocation(i),a=A.lineIndex,o=A.charIndex,s=this.getValueOfPropertyAt(a,o,"fontSize")*this.lineHeight,u=h.leftOffset,g=this.calcTransformMatrix(),f={x:h.left+u,y:h.top+h.topOffset+s},p=this.canvas.getRetinaScaling(),v=this.canvas.upperCanvasEl,C=v.width/p,y=v.height/p,E=C-s,w=y-s,I=v.clientWidth/C,S=v.clientHeight/y;return f=t.util.transformPoint(f,g),f=t.util.transformPoint(f,this.canvas.viewportTransform),f.x*=I,f.y*=S,f.x<0&&(f.x=0),f.x>E&&(f.x=E),f.y<0&&(f.y=0),f.y>w&&(f.y=w),f.x+=this.canvas._offset.left,f.y+=this.canvas._offset.top,{left:f.x+"px",top:f.y+"px",fontSize:s+"px",charHeight:s}},_saveEditingProps:function(){this._savedProps={hasControls:this.hasControls,borderColor:this.borderColor,lockMovementX:this.lockMovementX,lockMovementY:this.lockMovementY,hoverCursor:this.hoverCursor,selectable:this.selectable,defaultCursor:this.canvas&&this.canvas.defaultCursor,moveCursor:this.canvas&&this.canvas.moveCursor}},_restoreEditingProps:function(){this._savedProps&&(this.hoverCursor=this._savedProps.hoverCursor,this.hasControls=this._savedProps.hasControls,this.borderColor=this._savedProps.borderColor,this.selectable=this._savedProps.selectable,this.lockMovementX=this._savedProps.lockMovementX,this.lockMovementY=this._savedProps.lockMovementY,this.canvas&&(this.canvas.defaultCursor=this._savedProps.defaultCursor,this.canvas.moveCursor=this._savedProps.moveCursor))},exitEditing:function(){var i=this._textBeforeEdit!==this.text,h=this.hiddenTextarea;return this.selected=!1,this.isEditing=!1,this.selectionEnd=this.selectionStart,h&&(h.blur&&h.blur(),h.parentNode&&h.parentNode.removeChild(h)),this.hiddenTextarea=null,this.abortCursorAnimation(),this._restoreEditingProps(),this._currentCursorOpacity=0,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this.fire("editing:exited"),i&&this.fire("modified"),this.canvas&&(this.canvas.off("mouse:move",this.mouseMoveHandler),this.canvas.fire("text:editing:exited",{target:this}),i&&this.canvas.fire("object:modified",{target:this})),this},_removeExtraneousStyles:function(){for(var i in this.styles)this._textLines[i]||delete this.styles[i]},removeStyleFromTo:function(i,h){var A=this.get2DCursorLocation(i,!0),a=this.get2DCursorLocation(h,!0),o=A.lineIndex,s=A.charIndex,u=a.lineIndex,g=a.charIndex,f,p;if(o!==u){if(this.styles[o])for(f=s;f=g&&(p[C-v]=p[y],delete p[y])}},shiftLineStyles:function(i,h){var A=c(this.styles);for(var a in this.styles){var o=parseInt(a,10);o>i&&(this.styles[o+h]=A[o],A[o-h]||delete this.styles[o])}},restartCursorIfNeeded:function(){(!this._currentTickState||this._currentTickState.isAborted||!this._currentTickCompleteState||this._currentTickCompleteState.isAborted)&&this.initDelayedCursor()},insertNewlineStyleObject:function(i,h,A,a){var o,s={},u=!1,g=this._unwrappedTextLines[i].length===h;A||(A=1),this.shiftLineStyles(i,A),this.styles[i]&&(o=this.styles[i][h===0?h:h-1]);for(var f in this.styles[i]){var p=parseInt(f,10);p>=h&&(u=!0,s[p-h]=this.styles[i][f],g&&h===0||delete this.styles[i][f])}var v=!1;for(u&&!g&&(this.styles[i+A]=s,v=!0),v&&A--;A>0;)a&&a[A-1]?this.styles[i+A]={0:c(a[A-1])}:o?this.styles[i+A]={0:c(o)}:delete this.styles[i+A],A--;this._forceClearCache=!0},insertCharStyleObject:function(i,h,A,a){this.styles||(this.styles={});var o=this.styles[i],s=o?c(o):{};A||(A=1);for(var u in s){var g=parseInt(u,10);g>=h&&(o[g+A]=s[g],s[g-A]||delete o[g])}if(this._forceClearCache=!0,a){for(;A--;)Object.keys(a[A]).length&&(this.styles[i]||(this.styles[i]={}),this.styles[i][h+A]=c(a[A]));return}if(o)for(var f=o[h?h-1:1];f&&A--;)this.styles[i][h+A]=c(f)},insertNewStyleBlock:function(i,h,A){for(var a=this.get2DCursorLocation(h,!0),o=[0],s=0,u=0;u0&&(this.insertCharStyleObject(a.lineIndex,a.charIndex,o[0],A),A=A&&A.slice(o[0]+1)),s&&this.insertNewlineStyleObject(a.lineIndex,a.charIndex+o[0],s);for(var u=1;u0?this.insertCharStyleObject(a.lineIndex+u,0,o[u],A):A&&this.styles[a.lineIndex+u]&&A[0]&&(this.styles[a.lineIndex+u][0]=A[0]),A=A&&A.slice(o[u]+1);o[u]>0&&this.insertCharStyleObject(a.lineIndex+u,0,o[u],A)},setSelectionStartEndWithShift:function(i,h,A){A<=i?(h===i?this._selectionDirection="left":this._selectionDirection==="right"&&(this._selectionDirection="left",this.selectionEnd=i),this.selectionStart=A):A>i&&Ai?this.selectionStart=i:this.selectionStart<0&&(this.selectionStart=0),this.selectionEnd>i?this.selectionEnd=i:this.selectionEnd<0&&(this.selectionEnd=0)}})}(),t.util.object.extend(t.IText.prototype,{initDoubleClickSimulation:function(){this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown)},onMouseDown:function(c){if(this.canvas){this.__newClickTime=+new Date;var i=c.pointer;this.isTripleClick(i)&&(this.fire("tripleclick",c),this._stopEvent(c.e)),this.__lastLastClickTime=this.__lastClickTime,this.__lastClickTime=this.__newClickTime,this.__lastPointer=i,this.__lastIsEditing=this.isEditing,this.__lastSelected=this.selected}},isTripleClick:function(c){return this.__newClickTime-this.__lastClickTime<500&&this.__lastClickTime-this.__lastLastClickTime<500&&this.__lastPointer.x===c.x&&this.__lastPointer.y===c.y},_stopEvent:function(c){c.preventDefault&&c.preventDefault(),c.stopPropagation&&c.stopPropagation()},initCursorSelectionHandlers:function(){this.initMousedownHandler(),this.initMouseupHandler(),this.initClicks()},doubleClickHandler:function(c){this.isEditing&&this.selectWord(this.getSelectionStartFromPointer(c.e))},tripleClickHandler:function(c){this.isEditing&&this.selectLine(this.getSelectionStartFromPointer(c.e))},initClicks:function(){this.on("mousedblclick",this.doubleClickHandler),this.on("tripleclick",this.tripleClickHandler)},_mouseDownHandler:function(c){!this.canvas||!this.editable||c.e.button&&c.e.button!==1||(this.__isMousedown=!0,this.selected&&(this.inCompositionMode=!1,this.setCursorByClick(c.e)),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection()))},_mouseDownHandlerBefore:function(c){!this.canvas||!this.editable||c.e.button&&c.e.button!==1||(this.selected=this===this.canvas._activeObject)},initMousedownHandler:function(){this.on("mousedown",this._mouseDownHandler),this.on("mousedown:before",this._mouseDownHandlerBefore)},initMouseupHandler:function(){this.on("mouseup",this.mouseUpHandler)},mouseUpHandler:function(c){if(this.__isMousedown=!1,!(!this.editable||this.group||c.transform&&c.transform.actionPerformed||c.e.button&&c.e.button!==1)){if(this.canvas){var i=this.canvas._activeObject;if(i&&i!==this)return}this.__lastSelected&&!this.__corner?(this.selected=!1,this.__lastSelected=!1,this.enterEditing(c.e),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()):this.selected=!0}},setCursorByClick:function(c){var i=this.getSelectionStartFromPointer(c),h=this.selectionStart,A=this.selectionEnd;c.shiftKey?this.setSelectionStartEndWithShift(h,A,i):(this.selectionStart=i,this.selectionEnd=i),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())},getSelectionStartFromPointer:function(c){for(var i=this.getLocalPointer(c),h=0,A=0,a=0,o=0,s=0,u,g,f=0,p=this._textLines.length;f0&&(o+=this._textLines[f-1].length+this.missingNewlineOffset(f-1));u=this._getLineLeftOffset(s),A=u*this.scaleX,g=this._textLines[s],this.direction==="rtl"&&(i.x=this.width*this.scaleX-i.x+A);for(var v=0,C=g.length;vo||s<0?0:1,g=A+u;return this.flipX&&(g=a-g),g>this._text.length&&(g=this._text.length),g}}),t.util.object.extend(t.IText.prototype,{initHiddenTextarea:function(){this.hiddenTextarea=t.document.createElement("textarea"),this.hiddenTextarea.setAttribute("autocapitalize","off"),this.hiddenTextarea.setAttribute("autocorrect","off"),this.hiddenTextarea.setAttribute("autocomplete","off"),this.hiddenTextarea.setAttribute("spellcheck","false"),this.hiddenTextarea.setAttribute("data-fabric-hiddentextarea",""),this.hiddenTextarea.setAttribute("wrap","off");var c=this._calcTextareaPosition();this.hiddenTextarea.style.cssText="position: absolute; top: "+c.top+"; left: "+c.left+"; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; padding-top: "+c.fontSize+";",this.hiddenTextareaContainer?this.hiddenTextareaContainer.appendChild(this.hiddenTextarea):t.document.body.appendChild(this.hiddenTextarea),t.util.addListener(this.hiddenTextarea,"keydown",this.onKeyDown.bind(this)),t.util.addListener(this.hiddenTextarea,"keyup",this.onKeyUp.bind(this)),t.util.addListener(this.hiddenTextarea,"input",this.onInput.bind(this)),t.util.addListener(this.hiddenTextarea,"copy",this.copy.bind(this)),t.util.addListener(this.hiddenTextarea,"cut",this.copy.bind(this)),t.util.addListener(this.hiddenTextarea,"paste",this.paste.bind(this)),t.util.addListener(this.hiddenTextarea,"compositionstart",this.onCompositionStart.bind(this)),t.util.addListener(this.hiddenTextarea,"compositionupdate",this.onCompositionUpdate.bind(this)),t.util.addListener(this.hiddenTextarea,"compositionend",this.onCompositionEnd.bind(this)),!this._clickHandlerInitialized&&this.canvas&&(t.util.addListener(this.canvas.upperCanvasEl,"click",this.onClick.bind(this)),this._clickHandlerInitialized=!0)},keysMap:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorRight",36:"moveCursorLeft",37:"moveCursorLeft",38:"moveCursorUp",39:"moveCursorRight",40:"moveCursorDown"},keysMapRtl:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorLeft",36:"moveCursorRight",37:"moveCursorRight",38:"moveCursorUp",39:"moveCursorLeft",40:"moveCursorDown"},ctrlKeysMapUp:{67:"copy",88:"cut"},ctrlKeysMapDown:{65:"selectAll"},onClick:function(){this.hiddenTextarea&&this.hiddenTextarea.focus()},onKeyDown:function(c){if(this.isEditing){var i=this.direction==="rtl"?this.keysMapRtl:this.keysMap;if(c.keyCode in i)this[i[c.keyCode]](c);else if(c.keyCode in this.ctrlKeysMapDown&&(c.ctrlKey||c.metaKey))this[this.ctrlKeysMapDown[c.keyCode]](c);else return;c.stopImmediatePropagation(),c.preventDefault(),c.keyCode>=33&&c.keyCode<=40?(this.inCompositionMode=!1,this.clearContextTop(),this.renderCursorOrSelection()):this.canvas&&this.canvas.requestRenderAll()}},onKeyUp:function(c){if(!this.isEditing||this._copyDone||this.inCompositionMode){this._copyDone=!1;return}if(c.keyCode in this.ctrlKeysMapUp&&(c.ctrlKey||c.metaKey))this[this.ctrlKeysMapUp[c.keyCode]](c);else return;c.stopImmediatePropagation(),c.preventDefault(),this.canvas&&this.canvas.requestRenderAll()},onInput:function(c){var i=this.fromPaste;if(this.fromPaste=!1,c&&c.stopPropagation(),!!this.isEditing){var h=this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,A=this._text.length,a=h.length,o,s,u=a-A,g=this.selectionStart,f=this.selectionEnd,p=g!==f,v,C,y;if(this.hiddenTextarea.value===""){this.styles={},this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll());return}var E=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value),w=g>E.selectionStart;p?(o=this._text.slice(g,f),u+=f-g):a0&&(A=this.__charBounds[c][i-1],h+=A.left+A.width),h},getDownCursorOffset:function(c,i){var h=this._getSelectionForOffset(c,i),A=this.get2DCursorLocation(h),a=A.lineIndex;if(a===this._textLines.length-1||c.metaKey||c.keyCode===34)return this._text.length-h;var o=A.charIndex,s=this._getWidthBeforeCursor(a,o),u=this._getIndexOnLine(a+1,s),g=this._textLines[a].slice(o);return g.length+u+1+this.missingNewlineOffset(a)},_getSelectionForOffset:function(c,i){return c.shiftKey&&this.selectionStart!==this.selectionEnd&&i?this.selectionEnd:this.selectionStart},getUpCursorOffset:function(c,i){var h=this._getSelectionForOffset(c,i),A=this.get2DCursorLocation(h),a=A.lineIndex;if(a===0||c.metaKey||c.keyCode===33)return-h;var o=A.charIndex,s=this._getWidthBeforeCursor(a,o),u=this._getIndexOnLine(a-1,s),g=this._textLines[a].slice(0,o),f=this.missingNewlineOffset(a-1);return-this._textLines[a-1].length+u-g.length+(1-f)},_getIndexOnLine:function(c,i){for(var h=this._textLines[c],A=this._getLineLeftOffset(c),a=A,o=0,s,u,g=0,f=h.length;gi){u=!0;var p=a-s,v=a,C=Math.abs(p-i),y=Math.abs(v-i);o=y=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorUpOrDown("Down",c)},moveCursorUp:function(c){this.selectionStart===0&&this.selectionEnd===0||this._moveCursorUpOrDown("Up",c)},_moveCursorUpOrDown:function(c,i){var h="get"+c+"CursorOffset",A=this[h](i,this._selectionDirection==="right");i.shiftKey?this.moveCursorWithShift(A):this.moveCursorWithoutShift(A),A!==0&&(this.setSelectionInBoundaries(),this.abortCursorAnimation(),this._currentCursorOpacity=1,this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorWithShift:function(c){var i=this._selectionDirection==="left"?this.selectionStart+c:this.selectionEnd+c;return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,i),c!==0},moveCursorWithoutShift:function(c){return c<0?(this.selectionStart+=c,this.selectionEnd=this.selectionStart):(this.selectionEnd+=c,this.selectionStart=this.selectionEnd),c!==0},moveCursorLeft:function(c){this.selectionStart===0&&this.selectionEnd===0||this._moveCursorLeftOrRight("Left",c)},_move:function(c,i,h){var A;if(c.altKey)A=this["findWordBoundary"+h](this[i]);else if(c.metaKey||c.keyCode===35||c.keyCode===36)A=this["findLineBoundary"+h](this[i]);else return this[i]+=h==="Left"?-1:1,!0;if(typeof A<"u"&&this[i]!==A)return this[i]=A,!0},_moveLeft:function(c,i){return this._move(c,i,"Left")},_moveRight:function(c,i){return this._move(c,i,"Right")},moveCursorLeftWithoutShift:function(c){var i=!0;return this._selectionDirection="left",this.selectionEnd===this.selectionStart&&this.selectionStart!==0&&(i=this._moveLeft(c,"selectionStart")),this.selectionEnd=this.selectionStart,i},moveCursorLeftWithShift:function(c){if(this._selectionDirection==="right"&&this.selectionStart!==this.selectionEnd)return this._moveLeft(c,"selectionEnd");if(this.selectionStart!==0)return this._selectionDirection="left",this._moveLeft(c,"selectionStart")},moveCursorRight:function(c){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorLeftOrRight("Right",c)},_moveCursorLeftOrRight:function(c,i){var h="moveCursor"+c+"With";this._currentCursorOpacity=1,i.shiftKey?h+="Shift":h+="outShift",this[h](i)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorRightWithShift:function(c){if(this._selectionDirection==="left"&&this.selectionStart!==this.selectionEnd)return this._moveRight(c,"selectionStart");if(this.selectionEnd!==this._text.length)return this._selectionDirection="right",this._moveRight(c,"selectionEnd")},moveCursorRightWithoutShift:function(c){var i=!0;return this._selectionDirection="right",this.selectionStart===this.selectionEnd?(i=this._moveRight(c,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,i},removeChars:function(c,i){typeof i>"u"&&(i=c+1),this.removeStyleFromTo(c,i),this._text.splice(c,i-c),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()},insertChars:function(c,i,h,A){typeof A>"u"&&(A=h),A>h&&this.removeStyleFromTo(h,A);var a=t.util.string.graphemeSplit(c);this.insertNewStyleBlock(a,h,i),this._text=[].concat(this._text.slice(0,h),a,this._text.slice(A)),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()}}),function(){var c=t.util.toFixed,i=/ +/g;t.util.object.extend(t.Text.prototype,{_toSVG:function(){var h=this._getSVGLeftTopOffsets(),A=this._getSVGTextAndBg(h.textTop,h.textLeft);return this._wrapSVGTextAndBg(A)},toSVG:function(h){return this._createBaseSVGMarkup(this._toSVG(),{reviver:h,noStyle:!0,withShadow:!0})},_getSVGLeftTopOffsets:function(){return{textLeft:-this.width/2,textTop:-this.height/2,lineTop:this.getHeightOfLine(0)}},_wrapSVGTextAndBg:function(h){var A=!0,a=this.getSvgTextDecoration(this);return[h.textBgRects.join(""),' ",h.textSpans.join(""),` -`]},_getSVGTextAndBg:function(h,A){var a=[],o=[],s=h,u;this._setSVGBg(o);for(var g=0,f=this._textLines.length;g",t.util.string.escapeXml(h),""].join("")},_setSVGTextLineText:function(h,A,a,o){var s=this.getHeightOfLine(A),u=this.textAlign.indexOf("justify")!==-1,g,f,p="",v,C,y=0,E=this._textLines[A],w;o+=s*(1-this._fontSizeFraction)/this.lineHeight;for(var I=0,S=E.length-1;I<=S;I++)w=I===S||this.charSpacing,p+=E[I],v=this.__charBounds[A][I],y===0?(a+=v.kernedWidth-v.width,y+=v.width):y+=v.kernedWidth,u&&!w&&this._reSpaceAndTab.test(E[I])&&(w=!0),w||(g=g||this.getCompleteStyleDeclaration(A,I),f=this.getCompleteStyleDeclaration(A,I+1),w=t.util.hasStyleChanged(g,f,!0)),w&&(C=this._getStyleDeclaration(A,I)||{},h.push(this._createTextCharSpan(p,C,a,o)),p="",g=f,a+=y,y=0)},_pushTextBgRect:function(h,A,a,o,s,u){var g=t.Object.NUM_FRACTION_DIGITS;h.push(" -`)},_setSVGTextLineBg:function(h,A,a,o){for(var s=this._textLines[A],u=this.getHeightOfLine(A)/this.lineHeight,g=0,f=0,p,v,C=this.getValueOfPropertyAt(A,0,"textBackgroundColor"),y=0,E=s.length;ythis.width&&this._set("width",this.dynamicMinWidth),this.textAlign.indexOf("justify")!==-1&&this.enlargeSpaces(),this.height=this.calcTextHeight(),this.saveState({propertySet:"_dimensionAffectingProps"}))},_generateStyleMap:function(h){for(var A=0,a=0,o=0,s={},u=0;u0?(a=0,o++,A++):!this.splitByGrapheme&&this._reSpaceAndTab.test(h.graphemeText[o])&&u>0&&(a++,o++),s[u]={line:A,offset:a},o+=h.graphemeLines[u].length,a+=h.graphemeLines[u].length;return s},styleHas:function(h,A){if(this._styleMap&&!this.isWrapping){var a=this._styleMap[A];a&&(A=a.line)}return i.Text.prototype.styleHas.call(this,h,A)},isEmptyStyles:function(h){if(!this.styles)return!0;var A=0,a=h+1,o,s,u=!1,g=this._styleMap[h],f=this._styleMap[h+1];g&&(h=g.line,A=g.offset),f&&(a=f.line,u=a===h,o=f.offset),s=typeof h>"u"?this.styles:{line:this.styles[h]};for(var p in s)for(var v in s[p])if(v>=A&&(!u||va&&!S?(g.push(f),f=[],s=E,S=!0):s+=D,!S&&!u&&f.push(y),f=f.concat(v),w=u?0:this._measureWord([y],A,C),C++,S=!1,E>I&&(I=E);return J&&g.push(f),I+R>this.dynamicMinWidth&&(this.dynamicMinWidth=I-D+R),g},isEndOfWrapping:function(h){return!this._styleMap[h+1]||this._styleMap[h+1].line!==this._styleMap[h].line},missingNewlineOffset:function(h){return this.splitByGrapheme?this.isEndOfWrapping(h)?1:0:1},_splitTextIntoLines:function(h){for(var A=i.Text.prototype._splitTextIntoLines.call(this,h),a=this._wrapText(A.lines,this.width),o=new Array(a.length),s=0;s=0&&r.splice(l,1)}emit(t,...n){const r=this.listenerMap[t];r&&r.forEach(l=>{l(...n)})}}const at=new Hy,ce={current:null},Yy=(e,t)=>{let n;return function(){clearTimeout(n),n=setTimeout(()=>{e.call(this,...arguments)},t)}},zy=e=>new Promise(t=>setTimeout(t,e)),Dc=(e,t)=>{const n=Object.prototype.toString.call(e),r=Object.prototype.toString.call(t);if(n!==r)return!1;if(n==="[object Array]"){for(let l=0;l{const t=Object.prototype.toString.call(e);if(t==="[object Array]")return e.map(n=>Oc(n));if(t==="[object Object]"){const n={};for(const r in e)n[r]=Oc(e[r]);return n}return e},co=class{constructor(t){Ce(this,"instance");Ce(this,"mapIdToChild");Ce(this,"mapInstanceToChild");Ce(this,"children");Ce(this,"width");Ce(this,"height");Ce(this,"backgroundImage");Ce(this,"backgroundColor");Ce(this,"bgFilter");Ce(this,"disableSave",!0);Ce(this,"operateStack",[]);Ce(this,"operateStack2",[]);Ce(this,"timer",0);Ce(this,"defaultJson",{type:"canvas",width:1280,height:720,backgroundImage:"",backgroundColor:"",children:[],bgFilter:""});ce.current=this,Ne.fabric.Object.prototype.transparentCorners=!1,Ne.fabric.Object.prototype.cornerStyle="circle",Ne.fabric.Object.prototype.cornerStrokeColor="#0066ff",Ne.fabric.Object.prototype.cornerColor="#0066ff",Ne.fabric.Object.prototype.borderDashArray=[5,5],Ne.fabric.Object.prototype.borderColor="#0066ff",Ne.fabric.Object.prototype.lockScalingFlip=!0,Ne.fabric.Object.prototype.minScaleLimit=.2,Ne.fabric.Image.prototype.lockScalingFlip=!0,this.mapIdToChild=new Map,this.mapInstanceToChild=new Map,this.width=t.width,this.height=t.height,this.backgroundImage=t.backgroundImage||"",this.backgroundColor=t.backgroundColor||"",this.bgFilter=t.bgFilter||"",this.instance=new Ne.fabric.Canvas(t.canvas,{width:t.width,height:t.height,backgroundColor:t.backgroundColor,preserveObjectStacking:!0}),this.instance.freeDrawingBrush.color="rgba(255,192,203,1)",this.instance.freeDrawingBrush.width=10,this.children=[],this.disableSave=!1,this.loadFromJson=this.loadFromJson.bind(this),this.resize=this.resize.bind(this),this.replaceBackgroundImage=this.replaceBackgroundImage.bind(this),this.removeBackgroundImage=this.removeBackgroundImage.bind(this),this.setBackgroundColor=this.setBackgroundColor.bind(this),this.changeBgFilter=this.changeBgFilter.bind(this),this.onSelect=this.onSelect.bind(this),this.saveToStack=this.saveToStack.bind(this),this.emitUpdateConfig=Yy(this.emitUpdateConfig.bind(this),0),this.emitStackStatus=this.emitStackStatus.bind(this),this.instance.on("mouse:up",()=>{this.children.forEach(n=>{n.updateConfig()})}),this.instance.on("selection:created",this.onSelect),this.instance.on("selection:updated",this.onSelect),this.instance.on("selection:cleared",this.onSelect),this.instance.on("path:created",async n=>{const r=n.path.path.reduce((d,m)=>d+m.join(" "),""),l=await CA.create({path:r,x:n.path.left,y:n.path.top,width:n.path.width,height:n.path.height,strokeWidth:n.path.strokeWidth,color:n.path.stroke,shadow:n.path.shadow});this.instance.remove(n.path),this.add(l)}),setTimeout(this.onSelect)}generateId(){let t=Math.random()*1e8>>0;for(;this.children.some(n=>n.id===t);)t=Math.random()*1e8>>0;return t}onSelect(){at.emit("selection-change")}emitUpdateConfig(){at.emit("update-config")}binarySearch(t){const n=this.children[this.children.length-1];if(this.children.length===0||t>=n.zIndex)return this.children.length;let r=0,l=this.children.length-1;for(;r<=l;){const d=r+l>>1,m=this.children[d];if(m.zIndex===t)return d;m.zIndex>t?l=d-1:r=d+1}return r}saveToStack(){this.disableSave||(clearTimeout(this.timer),this.timer=window.setTimeout(()=>{const t=this.toJson(),n=this.operateStack.pop();if(Dc(n,t))return;const r=Oc(t);this.operateStack.push(n,r),this.operateStack.length>co.OPERATE_STACK_MAX_LENGTH&&this.operateStack.shift(),this.operateStack2.length=0,this.emitStackStatus()},200))}emitStackStatus(){at.emit("stack-status",{undo:this.operateStack.length>0,redo:this.operateStack2.length>0})}static async createByJson(t,n){const r=new co({canvas:t,width:n.width,height:n.height,bgFilter:""});return await r.loadFromJson(n,!1),r}async loadFromJson(t,n=!0){this.disableSave=!0,this.backgroundColor="",this.backgroundImage="",this.width=1280,this.height=720,this.instance.clear(),this.children=[],this.mapIdToChild.clear(),this.mapInstanceToChild.clear(),n||(this.defaultJson=JSON.parse(JSON.stringify(t))),this.resize(t.width,t.height),await this.replaceBackgroundImage(t.backgroundImage),await this.setBackgroundColor(t.backgroundColor),this.changeBgFilter(t.bgFilter);for(let r=0;r{this.disableSave=!1})}getFormObject(){return{id:42,name:"画布",items:[{id:"replaceBackgroundImage",type:"upload-image",name:"替换背景图片",value:"",handler:this.replaceBackgroundImage},{id:"removeBackgroundImage",type:"button",name:"去除背景图片",value:"",handler:this.removeBackgroundImage},{id:"setBackgroundColor",type:"color",name:"设置背景颜色",value:this.backgroundColor,handler:this.setBackgroundColor},{id:"bgFilter",type:"select",name:"背景图滤镜",options:[{value:"",text:"原图"},{value:"Grayscale",text:"灰度"},{value:"Invert",text:"反色"},{value:"Sepia",text:"复古"},{value:"Vintage",text:"怀旧"},{value:"Kodachrome",text:"彩色"},{value:"Pixelate",text:"像素化"},{value:"Polaroid",text:"宝丽来"}],value:this.bgFilter||"",handler:this.changeBgFilter},{id:"size",type:"double-input",label:["宽","高"],name:"大小",value:[this.width,this.height],handler:this.resize}]}}resize(t,n){this.width=t,this.height=n,this.instance.setWidth(t),this.instance.setHeight(n);const r=document.getElementById("grid");r.style.width=`${t}px`,r.style.height=`${n}px`,this.instance.backgroundImage?(this.instance.backgroundImage.dispose(),this.replaceBackgroundImage(this.backgroundImage)):this.render(),this.saveToStack()}setBackgroundColor(t){return new Promise(n=>{this.instance.setBackgroundColor(t,()=>{this.backgroundColor=t,this.render(),this.emitUpdateConfig(),this.saveToStack(),n()})})}replaceBackgroundImage(t){return t===""?this.removeBackgroundImage():new Promise(n=>{this.instance.setBackgroundImage(t,()=>{this.backgroundImage=t;const r=this.instance.backgroundImage,{width:l=1,height:d=1}=r;r.scaleX=this.width/l,r.scaleY=this.height/d,this.bgFilter&&this.changeBgFilter(this.bgFilter),this.saveToStack(),n(),this.render()},{crossOrigin:"anonymous"})})}removeBackgroundImage(){this.instance.setBackgroundImage(null,()=>{this.backgroundImage="",this.saveToStack(),this.render()})}changeBgFilter(t){if(this.bgFilter=t||"",!this.backgroundImage){this.emitUpdateConfig();return}this.instance.backgroundImage.applyFilters(this.bgFilter?[new Ne.fabric.Image.filters[this.bgFilter]]:[]),this.render(),this.emitUpdateConfig(),this.saveToStack()}getSelected(){const t=this.instance.getActiveObjects(),n=[];return t.forEach(r=>{const l=this.mapInstanceToChild.get(r);l&&n.push(l)}),n}add(t){t.id=this.generateId();const n=this.binarySearch(t.zIndex);this.children.splice(n,0,t),this.instance.add(t.instance),this.bgFilter&&this.changeBgFilter(this.bgFilter),t.instance.moveTo(n),this.mapIdToChild.set(t.id,t),this.mapInstanceToChild.set(t.instance,t),this.saveToStack()}changeZIndex(t){const n=this.children.indexOf(t);if(n>=0){this.children.splice(n,1);const r=this.binarySearch(t.zIndex);this.children.splice(r,0,t),t.instance.moveTo(r)}}del(){const t=this.getSelected();this.children=this.children.filter(n=>t.indexOf(n)>=0?(this.instance.remove(n.instance),this.mapIdToChild.delete(n.id),this.mapInstanceToChild.delete(n.instance),!1):!0),this.instance.discardActiveObject(),this.render(),this.onSelect(),this.saveToStack()}async undo(){if(this.operateStack.length===0)return;this.operateStack2.push(this.operateStack.pop());const t=this.operateStack.slice(-1)[0]||this.defaultJson;this.emitStackStatus(),await this.loadFromJson(t),this.emitUpdateConfig()}async redo(){if(this.operateStack2.length===0)return;const t=this.operateStack2.pop();this.operateStack.push(t),this.emitStackStatus(),await this.loadFromJson(t),this.emitUpdateConfig()}async toImage(t){const n=this.instance.toDataURL();if(t){const r=document.createElement("canvas");r.width=this.width/4,r.height=this.height/4;const l=r.getContext("2d"),d=new Image;return d.src=n,await new Promise(m=>{d.onload=m}),l.drawImage(d,0,0,r.width,r.height),r.toDataURL("image/png")}return n}toJson(t){const n={type:"canvas",width:this.width,height:this.height,backgroundImage:this.backgroundImage,backgroundColor:this.backgroundColor,bgFilter:this.bgFilter,children:this.children.map(r=>r.getData())};if(t){const r=new Blob([JSON.stringify(n)],{type:"application/json"}),l=document.createElement("a"),d=URL.createObjectURL(r);l.href=d,l.download=`data-${Date.now()}.json`,l.click(),URL.revokeObjectURL(d)}return n}render(){this.instance.renderAll()}destroy(){this.children=[],this.mapIdToChild.clear(),this.mapInstanceToChild.clear(),this.instance.dispose()}};let sa=co;Ce(sa,"OPERATE_STACK_MAX_LENGTH",10);const Wy="_toast_e69rl_1",AA={"toast-root":"_toast-root_e69rl_1",toast:Wy};class Xy{constructor(){Ce(this,"domContainer",null);Ce(this,"reactRoot",null);Ce(this,"id",0);Ce(this,"timer",0);this.destroy=this.destroy.bind(this)}getContainer(){const t=document.createElement("div");return t.id=`toast-root-${++this.id}`,t.className=AA["toast-root"],document.body.append(t),this.domContainer=t,t}destroy(){this.reactRoot&&(this.reactRoot.unmount(),this.reactRoot=null),this.domContainer&&(document.body.removeChild(this.domContainer),this.domContainer=null)}show(t,n=2e3){this.destroy();const r=this.getContainer();this.reactRoot=Qs.createRoot(r),this.reactRoot.render(U("div",{className:AA.toast,children:t})),clearTimeout(this.timer),this.timer=window.setTimeout(this.destroy,n)}}const en=new Xy,Vy="_button_118g8_1",Jy="_loading_118g8_66",Ky="_rotate_118g8_1",ls={button:Vy,"button-default":"_button-default_118g8_37","button-loading":"_button-loading_118g8_46","button-primary":"_button-primary_118g8_52",loading:Jy,rotate:Ky};var x0={exports:{}};/*! +}`,gamma:[1,1,1],mainParameter:"gamma",initialize:function(a){this.gamma=[1,1,1],h.BaseFilter.prototype.initialize.call(this,a)},applyTo2d:function(a){var o=a.imageData,s=o.data,u=this.gamma,g=s.length,f=1/u[0],p=1/u[1],v=1/u[2],C;for(this.rVals||(this.rVals=new Uint8Array(256),this.gVals=new Uint8Array(256),this.bVals=new Uint8Array(256)),C=0,g=256;C'},_getCacheCanvasDimensions:function(){var a=this.callSuper("_getCacheCanvasDimensions"),o=this.fontSize;return a.width+=o*a.zoomX,a.height+=o*a.zoomY,a},_render:function(a){var o=this.path;o&&!o.isNotVisible()&&o._render(a),this._setTextStyles(a),this._renderTextLinesBackground(a),this._renderTextDecoration(a,"underline"),this._renderText(a),this._renderTextDecoration(a,"overline"),this._renderTextDecoration(a,"linethrough")},_renderText:function(a){this.paintFirst==="stroke"?(this._renderTextStroke(a),this._renderTextFill(a)):(this._renderTextFill(a),this._renderTextStroke(a))},_setTextStyles:function(a,o,s){if(a.textBaseline="alphabetical",this.path)switch(this.pathAlign){case"center":a.textBaseline="middle";break;case"ascender":a.textBaseline="top";break;case"descender":a.textBaseline="bottom";break}a.font=this._getFontDeclaration(o,s)},calcTextWidth:function(){for(var a=this.getLineWidth(0),o=1,s=this._textLines.length;oa&&(a=u)}return a},_renderTextLine:function(a,o,s,u,g,f){this._renderChars(a,o,s,u,g,f)},_renderTextLinesBackground:function(a){if(!(!this.textBackgroundColor&&!this.styleHas("textBackgroundColor"))){for(var o,s,u=a.fillStyle,g,f,p=this._getLeftOffset(),v=this._getTopOffset(),C=0,y=0,E,w,I=this.path,S,D=0,R=this._textLines.length;D=0:sw?y%=w:y<0&&(y+=w),this._setGraphemeOnPath(y,p,E),y+=p.kernedWidth}return{width:o,numOfSpaces:v}},_setGraphemeOnPath:function(a,o,s){var u=a+o.kernedWidth/2,g=this.path,f=i.util.getPointOnPath(g.path,u,g.segmentsInfo);o.renderLeft=f.x-s.x,o.renderTop=f.y-s.y,o.angle=f.angle+(this.pathSide==="right"?Math.PI:0)},_getGraphemeBox:function(a,o,s,u,g){var f=this.getCompleteStyleDeclaration(o,s),p=u?this.getCompleteStyleDeclaration(o,s-1):{},v=this._measureChar(a,f,u,p),C=v.kernedWidth,y=v.width,E;this.charSpacing!==0&&(E=this._getWidthOfCharSpacing(),y+=E,C+=E);var w={width:y,left:0,height:f.fontSize,kernedWidth:C,deltaY:f.deltaY};if(s>0&&!g){var I=this.__charBounds[o][s-1];w.left=I.left+I.width+v.kernedWidth-v.width}return w},getHeightOfLine:function(a){if(this.__lineHeights[a])return this.__lineHeights[a];for(var o=this._textLines[a],s=this.getHeightOfChar(a,0),u=1,g=o.length;u0){var T=E+f+S;this.direction==="rtl"&&(T=this.width-T-D),y&&te&&(a.fillStyle=te,a.fillRect(T,I+H*u+p,D,this.fontSize/15)),S=R.left,D=R.width,y=J,te=Z,u=g,p=v}else D+=R.kernedWidth;var T=E+f+S;this.direction==="rtl"&&(T=this.width-T-D),a.fillStyle=Z,J&&Z&&a.fillRect(T,I+H*u+p,D-oe,this.fontSize/15),w+=s}this._removeShadow(a)}},_getFontDeclaration:function(a,o){var s=a||this,u=this.fontFamily,g=i.Text.genericFonts.indexOf(u.toLowerCase())>-1,f=u===void 0||u.indexOf("'")>-1||u.indexOf(",")>-1||u.indexOf('"')>-1||g?s.fontFamily:'"'+s.fontFamily+'"';return[i.isLikelyNode?s.fontWeight:s.fontStyle,i.isLikelyNode?s.fontStyle:s.fontWeight,o?this.CACHE_FONT_SIZE+"px":s.fontSize+"px",f].join(" ")},render:function(a){this.visible&&(this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(this._shouldClearDimensionCache()&&this.initDimensions(),this.callSuper("render",a)))},_splitTextIntoLines:function(a){for(var o=a.split(this._reNewline),s=new Array(o.length),u=[` +`],g=[],f=0;f"u"?this.styles:{line:this.styles[c]};for(var h in i)for(var d in i[h])for(var a in i[h][d])return!1;return!0},styleHas:function(c,i){if(!this.styles||!c||c===""||typeof i<"u"&&!this.styles[i])return!1;var h=typeof i>"u"?this.styles:{0:this.styles[i]};for(var d in h)for(var a in h[d])if(typeof h[d][a][c]<"u")return!0;return!1},cleanStyle:function(c){if(!this.styles||!c||c==="")return!1;var i=this.styles,h=0,d,a,o=!0,s=0,u;for(var g in i){d=0;for(var f in i[g]){var u=i[g][f],p=u.hasOwnProperty(c);h++,p?(a?u[c]!==a&&(o=!1):a=u[c],u[c]===this[c]&&delete u[c]):o=!1,Object.keys(u).length!==0?d++:delete i[g][f]}d===0&&delete i[g]}for(var v=0;v"u"&&(c=this.selectionStart);for(var h=i?this._unwrappedTextLines:this._textLines,d=h.length,a=0;a"u"&&(c=this.selectionStart||0),typeof i>"u"&&(i=this.selectionEnd||c);for(var d=[],a=c;a"u"&&(i=this.selectionStart||0),typeof h>"u"&&(h=this.selectionEnd||i);for(var d=i;d"u"?this[a]:h[a];return d},_setStyleDeclaration:function(c,i,h){this.styles[c][i]=h},_deleteStyleDeclaration:function(c,i){delete this.styles[c][i]},_getLineStyle:function(c){return!!this.styles[c]},_setLineStyle:function(c){this.styles[c]={}},_deleteLineStyle:function(c){delete this.styles[c]}})}(),function(){function c(i){i.textDecoration&&(i.textDecoration.indexOf("underline")>-1&&(i.underline=!0),i.textDecoration.indexOf("line-through")>-1&&(i.linethrough=!0),i.textDecoration.indexOf("overline")>-1&&(i.overline=!0),delete i.textDecoration)}t.IText=t.util.createClass(t.Text,t.Observable,{type:"i-text",selectionStart:0,selectionEnd:0,selectionColor:"rgba(17,119,255,0.3)",isEditing:!1,editable:!0,editingBorderColor:"rgba(102,153,255,0.25)",cursorWidth:2,cursorColor:"",cursorDelay:1e3,cursorDuration:600,caching:!0,hiddenTextareaContainer:null,_reSpace:/\s|\n/,_currentCursorOpacity:0,_selectionDirection:null,_abortCursorAnimation:!1,__widthOfSpace:[],inCompositionMode:!1,initialize:function(i,h){this.callSuper("initialize",i,h),this.initBehavior()},setSelectionStart:function(i){i=Math.max(i,0),this._updateAndFire("selectionStart",i)},setSelectionEnd:function(i){i=Math.min(i,this.text.length),this._updateAndFire("selectionEnd",i)},_updateAndFire:function(i,h){this[i]!==h&&(this._fireSelectionChanged(),this[i]=h),this._updateTextarea()},_fireSelectionChanged:function(){this.fire("selection:changed"),this.canvas&&this.canvas.fire("text:selection:changed",{target:this})},initDimensions:function(){this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this.callSuper("initDimensions")},render:function(i){this.clearContextTop(),this.callSuper("render",i),this.cursorOffsetCache={},this.renderCursorOrSelection()},_render:function(i){this.callSuper("_render",i)},clearContextTop:function(i){if(!(!this.isEditing||!this.canvas||!this.canvas.contextTop)){var h=this.canvas.contextTop,d=this.canvas.viewportTransform;h.save(),h.transform(d[0],d[1],d[2],d[3],d[4],d[5]),this.transform(h),this._clearTextArea(h),i||h.restore()}},renderCursorOrSelection:function(){if(!(!this.isEditing||!this.canvas||!this.canvas.contextTop)){var i=this._getCursorBoundaries(),h=this.canvas.contextTop;this.clearContextTop(!0),this.selectionStart===this.selectionEnd?this.renderCursor(i,h):this.renderSelection(i,h),h.restore()}},_clearTextArea:function(i){var h=this.width+4,d=this.height+4;i.clearRect(-h/2,-d/2,h,d)},_getCursorBoundaries:function(i){typeof i>"u"&&(i=this.selectionStart);var h=this._getLeftOffset(),d=this._getTopOffset(),a=this._getCursorBoundariesOffsets(i);return{left:h,top:d,leftOffset:a.left,topOffset:a.top}},_getCursorBoundariesOffsets:function(i){if(this.cursorOffsetCache&&"top"in this.cursorOffsetCache)return this.cursorOffsetCache;var h,d,a,o=0,s=0,u,g=this.get2DCursorLocation(i);a=g.charIndex,d=g.lineIndex;for(var f=0;f0?s:0)},this.direction==="rtl"&&(u.left*=-1),this.cursorOffsetCache=u,this.cursorOffsetCache},renderCursor:function(i,h){var d=this.get2DCursorLocation(),a=d.lineIndex,o=d.charIndex>0?d.charIndex-1:0,s=this.getValueOfPropertyAt(a,o,"fontSize"),u=this.scaleX*this.canvas.getZoom(),g=this.cursorWidth/u,f=i.topOffset,p=this.getValueOfPropertyAt(a,o,"deltaY");f+=(1-this._fontSizeFraction)*this.getHeightOfLine(a)/this.lineHeight-s*(1-this._fontSizeFraction),this.inCompositionMode&&this.renderSelection(i,h),h.fillStyle=this.cursorColor||this.getValueOfPropertyAt(a,o,"fill"),h.globalAlpha=this.__isMousedown?1:this._currentCursorOpacity,h.fillRect(i.left+i.leftOffset-g/2,f+i.top+p,g,s)},renderSelection:function(i,h){for(var d=this.inCompositionMode?this.hiddenTextarea.selectionStart:this.selectionStart,a=this.inCompositionMode?this.hiddenTextarea.selectionEnd:this.selectionEnd,o=this.textAlign.indexOf("justify")!==-1,s=this.get2DCursorLocation(d),u=this.get2DCursorLocation(a),g=s.lineIndex,f=u.lineIndex,p=s.charIndex<0?0:s.charIndex,v=u.charIndex<0?0:u.charIndex,C=g;C<=f;C++){var y=this._getLineLeftOffset(C)||0,E=this.getHeightOfLine(C),w=0,I=0,S=0;if(C===g&&(I=this.__charBounds[g][p].left),C>=g&&C1)&&(E/=this.lineHeight);var R=i.left+y+I,J=S-I,ee=E,Z=0;this.inCompositionMode?(h.fillStyle=this.compositionColor||"black",ee=1,Z=E):h.fillStyle=this.selectionColor,this.direction==="rtl"&&(R=this.width-R-J),h.fillRect(R,i.top+i.topOffset+Z,J,ee),i.topOffset+=w}},getCurrentCharFontSize:function(){var i=this._getCurrentCharIndex();return this.getValueOfPropertyAt(i.l,i.c,"fontSize")},getCurrentCharColor:function(){var i=this._getCurrentCharIndex();return this.getValueOfPropertyAt(i.l,i.c,"fill")},_getCurrentCharIndex:function(){var i=this.get2DCursorLocation(this.selectionStart,!0),h=i.charIndex>0?i.charIndex-1:0;return{l:i.lineIndex,c:h}}}),t.IText.fromObject=function(i,h){var d=t.util.stylesFromArray(i.styles,i.text),a=Object.assign({},i,{styles:d});if(c(a),a.styles)for(var o in a.styles)for(var s in a.styles[o])c(a.styles[o][s]);t.Object._fromObject("IText",a,h,"text")}}(),function(){var c=t.util.object.clone;t.util.object.extend(t.IText.prototype,{initBehavior:function(){this.initAddedHandler(),this.initRemovedHandler(),this.initCursorSelectionHandlers(),this.initDoubleClickSimulation(),this.mouseMoveHandler=this.mouseMoveHandler.bind(this)},onDeselect:function(){this.isEditing&&this.exitEditing(),this.selected=!1},initAddedHandler:function(){var i=this;this.on("added",function(){var h=i.canvas;h&&(h._hasITextHandlers||(h._hasITextHandlers=!0,i._initCanvasHandlers(h)),h._iTextInstances=h._iTextInstances||[],h._iTextInstances.push(i))})},initRemovedHandler:function(){var i=this;this.on("removed",function(){var h=i.canvas;h&&(h._iTextInstances=h._iTextInstances||[],t.util.removeFromArray(h._iTextInstances,i),h._iTextInstances.length===0&&(h._hasITextHandlers=!1,i._removeCanvasHandlers(h)))})},_initCanvasHandlers:function(i){i._mouseUpITextHandler=function(){i._iTextInstances&&i._iTextInstances.forEach(function(h){h.__isMousedown=!1})},i.on("mouse:up",i._mouseUpITextHandler)},_removeCanvasHandlers:function(i){i.off("mouse:up",i._mouseUpITextHandler)},_tick:function(){this._currentTickState=this._animateCursor(this,1,this.cursorDuration,"_onTickComplete")},_animateCursor:function(i,h,d,a){var o;return o={isAborted:!1,abort:function(){this.isAborted=!0}},i.animate("_currentCursorOpacity",h,{duration:d,onComplete:function(){o.isAborted||i[a]()},onChange:function(){i.canvas&&i.selectionStart===i.selectionEnd&&i.renderCursorOrSelection()},abort:function(){return o.isAborted}}),o},_onTickComplete:function(){var i=this;this._cursorTimeout1&&clearTimeout(this._cursorTimeout1),this._cursorTimeout1=setTimeout(function(){i._currentTickCompleteState=i._animateCursor(i,0,this.cursorDuration/2,"_tick")},100)},initDelayedCursor:function(i){var h=this,d=i?0:this.cursorDelay;this.abortCursorAnimation(),this._currentCursorOpacity=1,this._cursorTimeout2=setTimeout(function(){h._tick()},d)},abortCursorAnimation:function(){var i=this._currentTickState||this._currentTickCompleteState,h=this.canvas;this._currentTickState&&this._currentTickState.abort(),this._currentTickCompleteState&&this._currentTickCompleteState.abort(),clearTimeout(this._cursorTimeout1),clearTimeout(this._cursorTimeout2),this._currentCursorOpacity=0,i&&h&&h.clearContext(h.contextTop||h.contextContainer)},selectAll:function(){return this.selectionStart=0,this.selectionEnd=this._text.length,this._fireSelectionChanged(),this._updateTextarea(),this},getSelectedText:function(){return this._text.slice(this.selectionStart,this.selectionEnd).join("")},findWordBoundaryLeft:function(i){var h=0,d=i-1;if(this._reSpace.test(this._text[d]))for(;this._reSpace.test(this._text[d]);)h++,d--;for(;/\S/.test(this._text[d])&&d>-1;)h++,d--;return i-h},findWordBoundaryRight:function(i){var h=0,d=i;if(this._reSpace.test(this._text[d]))for(;this._reSpace.test(this._text[d]);)h++,d++;for(;/\S/.test(this._text[d])&&d-1;)h++,d--;return i-h},findLineBoundaryRight:function(i){for(var h=0,d=i;!/\n/.test(this._text[d])&&d0&&athis.__selectionStartOnMouseDown?(this.selectionStart=this.__selectionStartOnMouseDown,this.selectionEnd=h):(this.selectionStart=h,this.selectionEnd=this.__selectionStartOnMouseDown),(this.selectionStart!==d||this.selectionEnd!==a)&&(this.restartCursorIfNeeded(),this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()))}},_setEditingProps:function(){this.hoverCursor="text",this.canvas&&(this.canvas.defaultCursor=this.canvas.moveCursor="text"),this.borderColor=this.editingBorderColor,this.hasControls=this.selectable=!1,this.lockMovementX=this.lockMovementY=!0},fromStringToGraphemeSelection:function(i,h,d){var a=d.slice(0,i),o=t.util.string.graphemeSplit(a).length;if(i===h)return{selectionStart:o,selectionEnd:o};var s=d.slice(i,h),u=t.util.string.graphemeSplit(s).length;return{selectionStart:o,selectionEnd:o+u}},fromGraphemeToStringSelection:function(i,h,d){var a=d.slice(0,i),o=a.join("").length;if(i===h)return{selectionStart:o,selectionEnd:o};var s=d.slice(i,h),u=s.join("").length;return{selectionStart:o,selectionEnd:o+u}},_updateTextarea:function(){if(this.cursorOffsetCache={},!!this.hiddenTextarea){if(!this.inCompositionMode){var i=this.fromGraphemeToStringSelection(this.selectionStart,this.selectionEnd,this._text);this.hiddenTextarea.selectionStart=i.selectionStart,this.hiddenTextarea.selectionEnd=i.selectionEnd}this.updateTextareaPosition()}},updateFromTextArea:function(){if(this.hiddenTextarea){this.cursorOffsetCache={},this.text=this.hiddenTextarea.value,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords());var i=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value);this.selectionEnd=this.selectionStart=i.selectionEnd,this.inCompositionMode||(this.selectionStart=i.selectionStart),this.updateTextareaPosition()}},updateTextareaPosition:function(){if(this.selectionStart===this.selectionEnd){var i=this._calcTextareaPosition();this.hiddenTextarea.style.left=i.left,this.hiddenTextarea.style.top=i.top}},_calcTextareaPosition:function(){if(!this.canvas)return{x:1,y:1};var i=this.inCompositionMode?this.compositionStart:this.selectionStart,h=this._getCursorBoundaries(i),d=this.get2DCursorLocation(i),a=d.lineIndex,o=d.charIndex,s=this.getValueOfPropertyAt(a,o,"fontSize")*this.lineHeight,u=h.leftOffset,g=this.calcTransformMatrix(),f={x:h.left+u,y:h.top+h.topOffset+s},p=this.canvas.getRetinaScaling(),v=this.canvas.upperCanvasEl,C=v.width/p,y=v.height/p,E=C-s,w=y-s,I=v.clientWidth/C,S=v.clientHeight/y;return f=t.util.transformPoint(f,g),f=t.util.transformPoint(f,this.canvas.viewportTransform),f.x*=I,f.y*=S,f.x<0&&(f.x=0),f.x>E&&(f.x=E),f.y<0&&(f.y=0),f.y>w&&(f.y=w),f.x+=this.canvas._offset.left,f.y+=this.canvas._offset.top,{left:f.x+"px",top:f.y+"px",fontSize:s+"px",charHeight:s}},_saveEditingProps:function(){this._savedProps={hasControls:this.hasControls,borderColor:this.borderColor,lockMovementX:this.lockMovementX,lockMovementY:this.lockMovementY,hoverCursor:this.hoverCursor,selectable:this.selectable,defaultCursor:this.canvas&&this.canvas.defaultCursor,moveCursor:this.canvas&&this.canvas.moveCursor}},_restoreEditingProps:function(){this._savedProps&&(this.hoverCursor=this._savedProps.hoverCursor,this.hasControls=this._savedProps.hasControls,this.borderColor=this._savedProps.borderColor,this.selectable=this._savedProps.selectable,this.lockMovementX=this._savedProps.lockMovementX,this.lockMovementY=this._savedProps.lockMovementY,this.canvas&&(this.canvas.defaultCursor=this._savedProps.defaultCursor,this.canvas.moveCursor=this._savedProps.moveCursor))},exitEditing:function(){var i=this._textBeforeEdit!==this.text,h=this.hiddenTextarea;return this.selected=!1,this.isEditing=!1,this.selectionEnd=this.selectionStart,h&&(h.blur&&h.blur(),h.parentNode&&h.parentNode.removeChild(h)),this.hiddenTextarea=null,this.abortCursorAnimation(),this._restoreEditingProps(),this._currentCursorOpacity=0,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this.fire("editing:exited"),i&&this.fire("modified"),this.canvas&&(this.canvas.off("mouse:move",this.mouseMoveHandler),this.canvas.fire("text:editing:exited",{target:this}),i&&this.canvas.fire("object:modified",{target:this})),this},_removeExtraneousStyles:function(){for(var i in this.styles)this._textLines[i]||delete this.styles[i]},removeStyleFromTo:function(i,h){var d=this.get2DCursorLocation(i,!0),a=this.get2DCursorLocation(h,!0),o=d.lineIndex,s=d.charIndex,u=a.lineIndex,g=a.charIndex,f,p;if(o!==u){if(this.styles[o])for(f=s;f=g&&(p[C-v]=p[y],delete p[y])}},shiftLineStyles:function(i,h){var d=c(this.styles);for(var a in this.styles){var o=parseInt(a,10);o>i&&(this.styles[o+h]=d[o],d[o-h]||delete this.styles[o])}},restartCursorIfNeeded:function(){(!this._currentTickState||this._currentTickState.isAborted||!this._currentTickCompleteState||this._currentTickCompleteState.isAborted)&&this.initDelayedCursor()},insertNewlineStyleObject:function(i,h,d,a){var o,s={},u=!1,g=this._unwrappedTextLines[i].length===h;d||(d=1),this.shiftLineStyles(i,d),this.styles[i]&&(o=this.styles[i][h===0?h:h-1]);for(var f in this.styles[i]){var p=parseInt(f,10);p>=h&&(u=!0,s[p-h]=this.styles[i][f],g&&h===0||delete this.styles[i][f])}var v=!1;for(u&&!g&&(this.styles[i+d]=s,v=!0),v&&d--;d>0;)a&&a[d-1]?this.styles[i+d]={0:c(a[d-1])}:o?this.styles[i+d]={0:c(o)}:delete this.styles[i+d],d--;this._forceClearCache=!0},insertCharStyleObject:function(i,h,d,a){this.styles||(this.styles={});var o=this.styles[i],s=o?c(o):{};d||(d=1);for(var u in s){var g=parseInt(u,10);g>=h&&(o[g+d]=s[g],s[g-d]||delete o[g])}if(this._forceClearCache=!0,a){for(;d--;)Object.keys(a[d]).length&&(this.styles[i]||(this.styles[i]={}),this.styles[i][h+d]=c(a[d]));return}if(o)for(var f=o[h?h-1:1];f&&d--;)this.styles[i][h+d]=c(f)},insertNewStyleBlock:function(i,h,d){for(var a=this.get2DCursorLocation(h,!0),o=[0],s=0,u=0;u0&&(this.insertCharStyleObject(a.lineIndex,a.charIndex,o[0],d),d=d&&d.slice(o[0]+1)),s&&this.insertNewlineStyleObject(a.lineIndex,a.charIndex+o[0],s);for(var u=1;u0?this.insertCharStyleObject(a.lineIndex+u,0,o[u],d):d&&this.styles[a.lineIndex+u]&&d[0]&&(this.styles[a.lineIndex+u][0]=d[0]),d=d&&d.slice(o[u]+1);o[u]>0&&this.insertCharStyleObject(a.lineIndex+u,0,o[u],d)},setSelectionStartEndWithShift:function(i,h,d){d<=i?(h===i?this._selectionDirection="left":this._selectionDirection==="right"&&(this._selectionDirection="left",this.selectionEnd=i),this.selectionStart=d):d>i&&di?this.selectionStart=i:this.selectionStart<0&&(this.selectionStart=0),this.selectionEnd>i?this.selectionEnd=i:this.selectionEnd<0&&(this.selectionEnd=0)}})}(),t.util.object.extend(t.IText.prototype,{initDoubleClickSimulation:function(){this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown)},onMouseDown:function(c){if(this.canvas){this.__newClickTime=+new Date;var i=c.pointer;this.isTripleClick(i)&&(this.fire("tripleclick",c),this._stopEvent(c.e)),this.__lastLastClickTime=this.__lastClickTime,this.__lastClickTime=this.__newClickTime,this.__lastPointer=i,this.__lastIsEditing=this.isEditing,this.__lastSelected=this.selected}},isTripleClick:function(c){return this.__newClickTime-this.__lastClickTime<500&&this.__lastClickTime-this.__lastLastClickTime<500&&this.__lastPointer.x===c.x&&this.__lastPointer.y===c.y},_stopEvent:function(c){c.preventDefault&&c.preventDefault(),c.stopPropagation&&c.stopPropagation()},initCursorSelectionHandlers:function(){this.initMousedownHandler(),this.initMouseupHandler(),this.initClicks()},doubleClickHandler:function(c){this.isEditing&&this.selectWord(this.getSelectionStartFromPointer(c.e))},tripleClickHandler:function(c){this.isEditing&&this.selectLine(this.getSelectionStartFromPointer(c.e))},initClicks:function(){this.on("mousedblclick",this.doubleClickHandler),this.on("tripleclick",this.tripleClickHandler)},_mouseDownHandler:function(c){!this.canvas||!this.editable||c.e.button&&c.e.button!==1||(this.__isMousedown=!0,this.selected&&(this.inCompositionMode=!1,this.setCursorByClick(c.e)),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection()))},_mouseDownHandlerBefore:function(c){!this.canvas||!this.editable||c.e.button&&c.e.button!==1||(this.selected=this===this.canvas._activeObject)},initMousedownHandler:function(){this.on("mousedown",this._mouseDownHandler),this.on("mousedown:before",this._mouseDownHandlerBefore)},initMouseupHandler:function(){this.on("mouseup",this.mouseUpHandler)},mouseUpHandler:function(c){if(this.__isMousedown=!1,!(!this.editable||this.group||c.transform&&c.transform.actionPerformed||c.e.button&&c.e.button!==1)){if(this.canvas){var i=this.canvas._activeObject;if(i&&i!==this)return}this.__lastSelected&&!this.__corner?(this.selected=!1,this.__lastSelected=!1,this.enterEditing(c.e),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()):this.selected=!0}},setCursorByClick:function(c){var i=this.getSelectionStartFromPointer(c),h=this.selectionStart,d=this.selectionEnd;c.shiftKey?this.setSelectionStartEndWithShift(h,d,i):(this.selectionStart=i,this.selectionEnd=i),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())},getSelectionStartFromPointer:function(c){for(var i=this.getLocalPointer(c),h=0,d=0,a=0,o=0,s=0,u,g,f=0,p=this._textLines.length;f0&&(o+=this._textLines[f-1].length+this.missingNewlineOffset(f-1));u=this._getLineLeftOffset(s),d=u*this.scaleX,g=this._textLines[s],this.direction==="rtl"&&(i.x=this.width*this.scaleX-i.x+d);for(var v=0,C=g.length;vo||s<0?0:1,g=d+u;return this.flipX&&(g=a-g),g>this._text.length&&(g=this._text.length),g}}),t.util.object.extend(t.IText.prototype,{initHiddenTextarea:function(){this.hiddenTextarea=t.document.createElement("textarea"),this.hiddenTextarea.setAttribute("autocapitalize","off"),this.hiddenTextarea.setAttribute("autocorrect","off"),this.hiddenTextarea.setAttribute("autocomplete","off"),this.hiddenTextarea.setAttribute("spellcheck","false"),this.hiddenTextarea.setAttribute("data-fabric-hiddentextarea",""),this.hiddenTextarea.setAttribute("wrap","off");var c=this._calcTextareaPosition();this.hiddenTextarea.style.cssText="position: absolute; top: "+c.top+"; left: "+c.left+"; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; padding-top: "+c.fontSize+";",this.hiddenTextareaContainer?this.hiddenTextareaContainer.appendChild(this.hiddenTextarea):t.document.body.appendChild(this.hiddenTextarea),t.util.addListener(this.hiddenTextarea,"keydown",this.onKeyDown.bind(this)),t.util.addListener(this.hiddenTextarea,"keyup",this.onKeyUp.bind(this)),t.util.addListener(this.hiddenTextarea,"input",this.onInput.bind(this)),t.util.addListener(this.hiddenTextarea,"copy",this.copy.bind(this)),t.util.addListener(this.hiddenTextarea,"cut",this.copy.bind(this)),t.util.addListener(this.hiddenTextarea,"paste",this.paste.bind(this)),t.util.addListener(this.hiddenTextarea,"compositionstart",this.onCompositionStart.bind(this)),t.util.addListener(this.hiddenTextarea,"compositionupdate",this.onCompositionUpdate.bind(this)),t.util.addListener(this.hiddenTextarea,"compositionend",this.onCompositionEnd.bind(this)),!this._clickHandlerInitialized&&this.canvas&&(t.util.addListener(this.canvas.upperCanvasEl,"click",this.onClick.bind(this)),this._clickHandlerInitialized=!0)},keysMap:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorRight",36:"moveCursorLeft",37:"moveCursorLeft",38:"moveCursorUp",39:"moveCursorRight",40:"moveCursorDown"},keysMapRtl:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorLeft",36:"moveCursorRight",37:"moveCursorRight",38:"moveCursorUp",39:"moveCursorLeft",40:"moveCursorDown"},ctrlKeysMapUp:{67:"copy",88:"cut"},ctrlKeysMapDown:{65:"selectAll"},onClick:function(){this.hiddenTextarea&&this.hiddenTextarea.focus()},onKeyDown:function(c){if(this.isEditing){var i=this.direction==="rtl"?this.keysMapRtl:this.keysMap;if(c.keyCode in i)this[i[c.keyCode]](c);else if(c.keyCode in this.ctrlKeysMapDown&&(c.ctrlKey||c.metaKey))this[this.ctrlKeysMapDown[c.keyCode]](c);else return;c.stopImmediatePropagation(),c.preventDefault(),c.keyCode>=33&&c.keyCode<=40?(this.inCompositionMode=!1,this.clearContextTop(),this.renderCursorOrSelection()):this.canvas&&this.canvas.requestRenderAll()}},onKeyUp:function(c){if(!this.isEditing||this._copyDone||this.inCompositionMode){this._copyDone=!1;return}if(c.keyCode in this.ctrlKeysMapUp&&(c.ctrlKey||c.metaKey))this[this.ctrlKeysMapUp[c.keyCode]](c);else return;c.stopImmediatePropagation(),c.preventDefault(),this.canvas&&this.canvas.requestRenderAll()},onInput:function(c){var i=this.fromPaste;if(this.fromPaste=!1,c&&c.stopPropagation(),!!this.isEditing){var h=this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,d=this._text.length,a=h.length,o,s,u=a-d,g=this.selectionStart,f=this.selectionEnd,p=g!==f,v,C,y;if(this.hiddenTextarea.value===""){this.styles={},this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll());return}var E=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value),w=g>E.selectionStart;p?(o=this._text.slice(g,f),u+=f-g):a0&&(d=this.__charBounds[c][i-1],h+=d.left+d.width),h},getDownCursorOffset:function(c,i){var h=this._getSelectionForOffset(c,i),d=this.get2DCursorLocation(h),a=d.lineIndex;if(a===this._textLines.length-1||c.metaKey||c.keyCode===34)return this._text.length-h;var o=d.charIndex,s=this._getWidthBeforeCursor(a,o),u=this._getIndexOnLine(a+1,s),g=this._textLines[a].slice(o);return g.length+u+1+this.missingNewlineOffset(a)},_getSelectionForOffset:function(c,i){return c.shiftKey&&this.selectionStart!==this.selectionEnd&&i?this.selectionEnd:this.selectionStart},getUpCursorOffset:function(c,i){var h=this._getSelectionForOffset(c,i),d=this.get2DCursorLocation(h),a=d.lineIndex;if(a===0||c.metaKey||c.keyCode===33)return-h;var o=d.charIndex,s=this._getWidthBeforeCursor(a,o),u=this._getIndexOnLine(a-1,s),g=this._textLines[a].slice(0,o),f=this.missingNewlineOffset(a-1);return-this._textLines[a-1].length+u-g.length+(1-f)},_getIndexOnLine:function(c,i){for(var h=this._textLines[c],d=this._getLineLeftOffset(c),a=d,o=0,s,u,g=0,f=h.length;gi){u=!0;var p=a-s,v=a,C=Math.abs(p-i),y=Math.abs(v-i);o=y=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorUpOrDown("Down",c)},moveCursorUp:function(c){this.selectionStart===0&&this.selectionEnd===0||this._moveCursorUpOrDown("Up",c)},_moveCursorUpOrDown:function(c,i){var h="get"+c+"CursorOffset",d=this[h](i,this._selectionDirection==="right");i.shiftKey?this.moveCursorWithShift(d):this.moveCursorWithoutShift(d),d!==0&&(this.setSelectionInBoundaries(),this.abortCursorAnimation(),this._currentCursorOpacity=1,this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorWithShift:function(c){var i=this._selectionDirection==="left"?this.selectionStart+c:this.selectionEnd+c;return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,i),c!==0},moveCursorWithoutShift:function(c){return c<0?(this.selectionStart+=c,this.selectionEnd=this.selectionStart):(this.selectionEnd+=c,this.selectionStart=this.selectionEnd),c!==0},moveCursorLeft:function(c){this.selectionStart===0&&this.selectionEnd===0||this._moveCursorLeftOrRight("Left",c)},_move:function(c,i,h){var d;if(c.altKey)d=this["findWordBoundary"+h](this[i]);else if(c.metaKey||c.keyCode===35||c.keyCode===36)d=this["findLineBoundary"+h](this[i]);else return this[i]+=h==="Left"?-1:1,!0;if(typeof d<"u"&&this[i]!==d)return this[i]=d,!0},_moveLeft:function(c,i){return this._move(c,i,"Left")},_moveRight:function(c,i){return this._move(c,i,"Right")},moveCursorLeftWithoutShift:function(c){var i=!0;return this._selectionDirection="left",this.selectionEnd===this.selectionStart&&this.selectionStart!==0&&(i=this._moveLeft(c,"selectionStart")),this.selectionEnd=this.selectionStart,i},moveCursorLeftWithShift:function(c){if(this._selectionDirection==="right"&&this.selectionStart!==this.selectionEnd)return this._moveLeft(c,"selectionEnd");if(this.selectionStart!==0)return this._selectionDirection="left",this._moveLeft(c,"selectionStart")},moveCursorRight:function(c){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorLeftOrRight("Right",c)},_moveCursorLeftOrRight:function(c,i){var h="moveCursor"+c+"With";this._currentCursorOpacity=1,i.shiftKey?h+="Shift":h+="outShift",this[h](i)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorRightWithShift:function(c){if(this._selectionDirection==="left"&&this.selectionStart!==this.selectionEnd)return this._moveRight(c,"selectionStart");if(this.selectionEnd!==this._text.length)return this._selectionDirection="right",this._moveRight(c,"selectionEnd")},moveCursorRightWithoutShift:function(c){var i=!0;return this._selectionDirection="right",this.selectionStart===this.selectionEnd?(i=this._moveRight(c,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,i},removeChars:function(c,i){typeof i>"u"&&(i=c+1),this.removeStyleFromTo(c,i),this._text.splice(c,i-c),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()},insertChars:function(c,i,h,d){typeof d>"u"&&(d=h),d>h&&this.removeStyleFromTo(h,d);var a=t.util.string.graphemeSplit(c);this.insertNewStyleBlock(a,h,i),this._text=[].concat(this._text.slice(0,h),a,this._text.slice(d)),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()}}),function(){var c=t.util.toFixed,i=/ +/g;t.util.object.extend(t.Text.prototype,{_toSVG:function(){var h=this._getSVGLeftTopOffsets(),d=this._getSVGTextAndBg(h.textTop,h.textLeft);return this._wrapSVGTextAndBg(d)},toSVG:function(h){return this._createBaseSVGMarkup(this._toSVG(),{reviver:h,noStyle:!0,withShadow:!0})},_getSVGLeftTopOffsets:function(){return{textLeft:-this.width/2,textTop:-this.height/2,lineTop:this.getHeightOfLine(0)}},_wrapSVGTextAndBg:function(h){var d=!0,a=this.getSvgTextDecoration(this);return[h.textBgRects.join(""),' ",h.textSpans.join(""),` +`]},_getSVGTextAndBg:function(h,d){var a=[],o=[],s=h,u;this._setSVGBg(o);for(var g=0,f=this._textLines.length;g",t.util.string.escapeXml(h),""].join("")},_setSVGTextLineText:function(h,d,a,o){var s=this.getHeightOfLine(d),u=this.textAlign.indexOf("justify")!==-1,g,f,p="",v,C,y=0,E=this._textLines[d],w;o+=s*(1-this._fontSizeFraction)/this.lineHeight;for(var I=0,S=E.length-1;I<=S;I++)w=I===S||this.charSpacing,p+=E[I],v=this.__charBounds[d][I],y===0?(a+=v.kernedWidth-v.width,y+=v.width):y+=v.kernedWidth,u&&!w&&this._reSpaceAndTab.test(E[I])&&(w=!0),w||(g=g||this.getCompleteStyleDeclaration(d,I),f=this.getCompleteStyleDeclaration(d,I+1),w=t.util.hasStyleChanged(g,f,!0)),w&&(C=this._getStyleDeclaration(d,I)||{},h.push(this._createTextCharSpan(p,C,a,o)),p="",g=f,a+=y,y=0)},_pushTextBgRect:function(h,d,a,o,s,u){var g=t.Object.NUM_FRACTION_DIGITS;h.push(" +`)},_setSVGTextLineBg:function(h,d,a,o){for(var s=this._textLines[d],u=this.getHeightOfLine(d)/this.lineHeight,g=0,f=0,p,v,C=this.getValueOfPropertyAt(d,0,"textBackgroundColor"),y=0,E=s.length;ythis.width&&this._set("width",this.dynamicMinWidth),this.textAlign.indexOf("justify")!==-1&&this.enlargeSpaces(),this.height=this.calcTextHeight(),this.saveState({propertySet:"_dimensionAffectingProps"}))},_generateStyleMap:function(h){for(var d=0,a=0,o=0,s={},u=0;u0?(a=0,o++,d++):!this.splitByGrapheme&&this._reSpaceAndTab.test(h.graphemeText[o])&&u>0&&(a++,o++),s[u]={line:d,offset:a},o+=h.graphemeLines[u].length,a+=h.graphemeLines[u].length;return s},styleHas:function(h,d){if(this._styleMap&&!this.isWrapping){var a=this._styleMap[d];a&&(d=a.line)}return i.Text.prototype.styleHas.call(this,h,d)},isEmptyStyles:function(h){if(!this.styles)return!0;var d=0,a=h+1,o,s,u=!1,g=this._styleMap[h],f=this._styleMap[h+1];g&&(h=g.line,d=g.offset),f&&(a=f.line,u=a===h,o=f.offset),s=typeof h>"u"?this.styles:{line:this.styles[h]};for(var p in s)for(var v in s[p])if(v>=d&&(!u||va&&!S?(g.push(f),f=[],s=E,S=!0):s+=D,!S&&!u&&f.push(y),f=f.concat(v),w=u?0:this._measureWord([y],d,C),C++,S=!1,E>I&&(I=E);return J&&g.push(f),I+R>this.dynamicMinWidth&&(this.dynamicMinWidth=I-D+R),g},isEndOfWrapping:function(h){return!this._styleMap[h+1]||this._styleMap[h+1].line!==this._styleMap[h].line},missingNewlineOffset:function(h){return this.splitByGrapheme?this.isEndOfWrapping(h)?1:0:1},_splitTextIntoLines:function(h){for(var d=i.Text.prototype._splitTextIntoLines.call(this,h),a=this._wrapText(d.lines,this.width),o=new Array(a.length),s=0;s=0&&r.splice(l,1)}emit(t,...n){const r=this.listenerMap[t];r&&r.forEach(l=>{l(...n)})}}const at=new $y,ce={current:null},Uy=(e,t)=>{let n;return function(){clearTimeout(n),n=setTimeout(()=>{e.call(this,...arguments)},t)}},Hy=e=>new Promise(t=>setTimeout(t,e)),Dc=(e,t)=>{const n=Object.prototype.toString.call(e),r=Object.prototype.toString.call(t);if(n!==r)return!1;if(n==="[object Array]"){for(let l=0;l{const t=Object.prototype.toString.call(e);if(t==="[object Array]")return e.map(n=>Oc(n));if(t==="[object Object]"){const n={};for(const r in e)n[r]=Oc(e[r]);return n}return e},uo=class{constructor(t){Ce(this,"instance");Ce(this,"mapIdToChild");Ce(this,"mapInstanceToChild");Ce(this,"children");Ce(this,"width");Ce(this,"height");Ce(this,"backgroundImage");Ce(this,"backgroundColor");Ce(this,"bgFilter");Ce(this,"disableSave",!0);Ce(this,"operateStack",[]);Ce(this,"operateStack2",[]);Ce(this,"timer",0);Ce(this,"defaultJson",{type:"canvas",width:1280,height:720,backgroundImage:"",backgroundColor:"",children:[],bgFilter:""});ce.current=this,Ne.fabric.Object.prototype.transparentCorners=!1,Ne.fabric.Object.prototype.cornerStyle="circle",Ne.fabric.Object.prototype.cornerStrokeColor="#0066ff",Ne.fabric.Object.prototype.cornerColor="#0066ff",Ne.fabric.Object.prototype.borderDashArray=[5,5],Ne.fabric.Object.prototype.borderColor="#0066ff",Ne.fabric.Object.prototype.lockScalingFlip=!0,Ne.fabric.Object.prototype.minScaleLimit=.2,Ne.fabric.Image.prototype.lockScalingFlip=!0,this.mapIdToChild=new Map,this.mapInstanceToChild=new Map,this.width=t.width,this.height=t.height,this.backgroundImage=t.backgroundImage||"",this.backgroundColor=t.backgroundColor||"",this.bgFilter=t.bgFilter||"",this.instance=new Ne.fabric.Canvas(t.canvas,{width:t.width,height:t.height,backgroundColor:t.backgroundColor,preserveObjectStacking:!0}),this.instance.freeDrawingBrush.color="rgba(255,192,203,1)",this.instance.freeDrawingBrush.width=10,this.children=[],this.disableSave=!1,this.loadFromJson=this.loadFromJson.bind(this),this.resize=this.resize.bind(this),this.replaceBackgroundImage=this.replaceBackgroundImage.bind(this),this.removeBackgroundImage=this.removeBackgroundImage.bind(this),this.setBackgroundColor=this.setBackgroundColor.bind(this),this.changeBgFilter=this.changeBgFilter.bind(this),this.onSelect=this.onSelect.bind(this),this.saveToStack=this.saveToStack.bind(this),this.emitUpdateConfig=Uy(this.emitUpdateConfig.bind(this),0),this.emitStackStatus=this.emitStackStatus.bind(this),this.instance.on("mouse:up",()=>{this.children.forEach(n=>{n.updateConfig()})}),this.instance.on("selection:created",this.onSelect),this.instance.on("selection:updated",this.onSelect),this.instance.on("selection:cleared",this.onSelect),this.instance.on("path:created",async n=>{const r=n.path.path.reduce((A,m)=>A+m.join(" "),""),l=await Cd.create({path:r,x:n.path.left,y:n.path.top,width:n.path.width,height:n.path.height,strokeWidth:n.path.strokeWidth,color:n.path.stroke,shadow:n.path.shadow});this.instance.remove(n.path),this.add(l)}),setTimeout(this.onSelect)}generateId(){let t=Math.random()*1e8>>0;for(;this.children.some(n=>n.id===t);)t=Math.random()*1e8>>0;return t}onSelect(){at.emit("selection-change")}emitUpdateConfig(){at.emit("update-config")}binarySearch(t){const n=this.children[this.children.length-1];if(this.children.length===0||t>=n.zIndex)return this.children.length;let r=0,l=this.children.length-1;for(;r<=l;){const A=r+l>>1,m=this.children[A];if(m.zIndex===t)return A;m.zIndex>t?l=A-1:r=A+1}return r}saveToStack(){this.disableSave||(clearTimeout(this.timer),this.timer=window.setTimeout(()=>{const t=this.toJson(),n=this.operateStack.pop();if(Dc(n,t))return;const r=Oc(t);this.operateStack.push(n,r),this.operateStack.length>uo.OPERATE_STACK_MAX_LENGTH&&this.operateStack.shift(),this.operateStack2.length=0,this.emitStackStatus()},200))}emitStackStatus(){at.emit("stack-status",{undo:this.operateStack.length>0,redo:this.operateStack2.length>0})}static async createByJson(t,n){const r=new uo({canvas:t,width:n.width,height:n.height,bgFilter:""});return await r.loadFromJson(n,!1),r}async loadFromJson(t,n=!0){this.disableSave=!0,this.backgroundColor="",this.backgroundImage="",this.width=1280,this.height=720,this.instance.clear(),this.children=[],this.mapIdToChild.clear(),this.mapInstanceToChild.clear(),n||(this.defaultJson=JSON.parse(JSON.stringify(t))),this.resize(t.width,t.height),await this.replaceBackgroundImage(t.backgroundImage),await this.setBackgroundColor(t.backgroundColor),this.changeBgFilter(t.bgFilter);for(let r=0;r{this.disableSave=!1})}getFormObject(){return{id:42,name:"画布",items:[{id:"replaceBackgroundImage",type:"upload-image",name:"替换背景图片",value:"",handler:this.replaceBackgroundImage},{id:"removeBackgroundImage",type:"button",name:"去除背景图片",value:"",handler:this.removeBackgroundImage},{id:"setBackgroundColor",type:"color",name:"设置背景颜色",value:this.backgroundColor,handler:this.setBackgroundColor},{id:"bgFilter",type:"select",name:"背景图滤镜",options:[{value:"",text:"原图"},{value:"Grayscale",text:"灰度"},{value:"Invert",text:"反色"},{value:"Sepia",text:"复古"},{value:"Vintage",text:"怀旧"},{value:"Kodachrome",text:"彩色"},{value:"Pixelate",text:"像素化"},{value:"Polaroid",text:"宝丽来"}],value:this.bgFilter||"",handler:this.changeBgFilter},{id:"size",type:"double-input",label:["宽","高"],name:"大小",value:[this.width,this.height],handler:this.resize}]}}resize(t,n){this.width=t,this.height=n,this.instance.setWidth(t),this.instance.setHeight(n);const r=document.getElementById("grid");r.style.width=`${t}px`,r.style.height=`${n}px`,this.instance.backgroundImage?(this.instance.backgroundImage.dispose(),this.replaceBackgroundImage(this.backgroundImage)):this.render(),this.saveToStack()}setBackgroundColor(t){return new Promise(n=>{this.instance.setBackgroundColor(t,()=>{this.backgroundColor=t,this.render(),this.emitUpdateConfig(),this.saveToStack(),n()})})}replaceBackgroundImage(t){return t===""?this.removeBackgroundImage():new Promise(n=>{this.instance.setBackgroundImage(t,()=>{this.backgroundImage=t;const r=this.instance.backgroundImage,{width:l=1,height:A=1}=r;r.scaleX=this.width/l,r.scaleY=this.height/A,this.bgFilter&&this.changeBgFilter(this.bgFilter),this.saveToStack(),n(),this.render()},{crossOrigin:"anonymous"})})}removeBackgroundImage(){this.instance.setBackgroundImage(null,()=>{this.backgroundImage="",this.saveToStack(),this.render()})}changeBgFilter(t){if(this.bgFilter=t||"",!this.backgroundImage){this.emitUpdateConfig();return}this.instance.backgroundImage.applyFilters(this.bgFilter?[new Ne.fabric.Image.filters[this.bgFilter]]:[]),this.render(),this.emitUpdateConfig(),this.saveToStack()}getSelected(){const t=this.instance.getActiveObjects(),n=[];return t.forEach(r=>{const l=this.mapInstanceToChild.get(r);l&&n.push(l)}),n}add(t){t.id=this.generateId();const n=this.binarySearch(t.zIndex);this.children.splice(n,0,t),this.instance.add(t.instance),this.bgFilter&&this.changeBgFilter(this.bgFilter),t.instance.moveTo(n),this.mapIdToChild.set(t.id,t),this.mapInstanceToChild.set(t.instance,t),this.saveToStack()}changeZIndex(t){const n=this.children.indexOf(t);if(n>=0){this.children.splice(n,1);const r=this.binarySearch(t.zIndex);this.children.splice(r,0,t),t.instance.moveTo(r)}}del(){const t=this.getSelected();this.children=this.children.filter(n=>t.indexOf(n)>=0?(this.instance.remove(n.instance),this.mapIdToChild.delete(n.id),this.mapInstanceToChild.delete(n.instance),!1):!0),this.instance.discardActiveObject(),this.render(),this.onSelect(),this.saveToStack()}async undo(){if(this.operateStack.length===0)return;this.operateStack2.push(this.operateStack.pop());const t=this.operateStack.slice(-1)[0]||this.defaultJson;this.emitStackStatus(),await this.loadFromJson(t),this.emitUpdateConfig()}async redo(){if(this.operateStack2.length===0)return;const t=this.operateStack2.pop();this.operateStack.push(t),this.emitStackStatus(),await this.loadFromJson(t),this.emitUpdateConfig()}async toImage(t){const n=this.instance.toDataURL();if(t){const r=document.createElement("canvas");r.width=this.width/4,r.height=this.height/4;const l=r.getContext("2d"),A=new Image;return A.src=n,await new Promise(m=>{A.onload=m}),l.drawImage(A,0,0,r.width,r.height),r.toDataURL("image/png")}return n}toJson(t){const n={type:"canvas",width:this.width,height:this.height,backgroundImage:this.backgroundImage,backgroundColor:this.backgroundColor,bgFilter:this.bgFilter,children:this.children.map(r=>r.getData())};if(t){const r=new Blob([JSON.stringify(n)],{type:"application/json"}),l=document.createElement("a"),A=URL.createObjectURL(r);l.href=A,l.download=`data-${Date.now()}.json`,l.click(),URL.revokeObjectURL(A)}return n}render(){this.instance.renderAll()}destroy(){this.children=[],this.mapIdToChild.clear(),this.mapInstanceToChild.clear(),this.instance.dispose()}};let sa=uo;Ce(sa,"OPERATE_STACK_MAX_LENGTH",10);const Yy="_toast_e69rl_1",dd={"toast-root":"_toast-root_e69rl_1",toast:Yy};class zy{constructor(){Ce(this,"domContainer",null);Ce(this,"reactRoot",null);Ce(this,"id",0);Ce(this,"timer",0);this.destroy=this.destroy.bind(this)}getContainer(){const t=document.createElement("div");return t.id=`toast-root-${++this.id}`,t.className=dd["toast-root"],document.body.append(t),this.domContainer=t,t}destroy(){this.reactRoot&&(this.reactRoot.unmount(),this.reactRoot=null),this.domContainer&&(document.body.removeChild(this.domContainer),this.domContainer=null)}show(t,n=2e3){this.destroy();const r=this.getContainer();this.reactRoot=ks.createRoot(r),this.reactRoot.render(U("div",{className:dd.toast,children:t})),clearTimeout(this.timer),this.timer=window.setTimeout(this.destroy,n)}}const en=new zy,Wy="_button_118g8_1",Xy="_loading_118g8_66",Vy="_rotate_118g8_1",cs={button:Wy,"button-default":"_button-default_118g8_37","button-loading":"_button-loading_118g8_46","button-primary":"_button-primary_118g8_52",loading:Xy,rotate:Vy};var x0={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],l=0;l{if(i||d===void 0)return;const s=d(o);s instanceof Promise&&(c(!0),s.finally(()=>{c(!1)}))},style:t,children:[i&&U(Dt,{type:"icon-loading",className:ls.loading}),l]})}const qy="_icon_5ds2t_1",Zy={icon:qy};function Dt({type:e,className:t,style:n,onClick:r}){const l=zt(Zy.icon,t);return U("svg",{className:l,style:n,onClick:r,children:U("use",{xlinkHref:`#${e}`})})}function rh({children:e}){const t=K.exports.useMemo(()=>{const n=document.getElementById("portal-root");if(!n){const r=document.createElement("div");return r.id="portal-root",document.body.append(r),r}return n},[]);return fu.exports.createPortal(e,t)}const e1="_tips_pdf5z_1",t1={tips:e1};function Fc({className:e,style:t,visible:n,position:r,text:l,children:d,onClick:m}){const c=K.exports.useRef(null),[i,h]=K.exports.useState(!1),[A,a]=K.exports.useState({left:0,top:0}),o=K.exports.useCallback(()=>{const v=c.current;v&&setTimeout(()=>{const{x:C,y,width:E,height:w}=v.children[0].getBoundingClientRect();a({left:C+E/2,top:r==="bottom"?y+w+12:y-44})})},[r]),s=()=>{h(!0)},u=()=>{h(!1)},g=n===void 0?i:n;K.exports.useEffect(()=>{if(o(),g)return window.addEventListener("mousemove",o),window.addEventListener("mousedown",o),()=>{window.removeEventListener("mousemove",o),window.removeEventListener("mousedown",o)}},[g]);const{left:f,top:p}=A;return pe("div",{ref:c,className:e,style:t,onMouseEnter:s,onMouseLeave:u,onClick:m,children:[d,g&&U(rh,{children:U("div",{className:t1.tips,style:{left:f,top:p},children:l})})]})}const n1="_loading_myyfb_1",dA={"loading-wrapper":"_loading-wrapper_myyfb_1",loading:n1,"square-jelly-box-animate":"_square-jelly-box-animate_myyfb_1","square-jelly-box-shadow":"_square-jelly-box-shadow_myyfb_1"};function r1(e){const t=K.exports.useRef(null),n=e.size||96;return K.exports.useLayoutEffect(()=>{const r=t.current;if(!r)return;const l=n/3;r.style.setProperty("--size",`${n}px`),r.style.setProperty("--item-size",`${l}px`)},[]),pe("div",{ref:t,className:dA["loading-wrapper"],children:[U("div",{className:dA.loading}),U("div",{style:{marginTop:8},children:"加载中"})]})}const i1="_select_lsl65_1",a1="_sprites_lsl65_26",s1="_options_lsl65_30",o1="_option_lsl65_30",l1="_arrow_lsl65_73",Vn={"select-wrapper":"_select-wrapper_lsl65_1",select:i1,"select-focus":"_select-focus_lsl65_21",sprites:a1,options:s1,option:o1,"option-selected":"_option-selected_lsl65_66",arrow:l1};function c1({className:e,style:t,options:n,value:r,onChange:l}){const[d,m]=K.exports.useState(n[0].value),[c,i]=K.exports.useState(!1),[h,A]=K.exports.useState({left:0,top:0,width:0}),a=K.exports.useRef(null),o=K.exports.useMemo(()=>n.reduce((v,C)=>(v[C.value],v[C.value]=C,v),{}),[n]),s=K.exports.useCallback(()=>{i(!1),window.removeEventListener("click",s)},[]),u=v=>{c?s():(i(!0),setTimeout(()=>{window.addEventListener("click",s)}))},g=v=>{m(v.value),setTimeout(()=>{l&&l(v.value,v)})},f=K.exports.useCallback(()=>{const v=a.current;if(!v)return;const C=v.getBoundingClientRect(),{x:y,y:E,width:w,height:I}=C;A({left:y,top:E+I+8,width:w})},[]);K.exports.useEffect(()=>{if(c)return f(),window.addEventListener("resize",f),()=>{window.removeEventListener("resize",f)}},[c]),K.exports.useLayoutEffect(()=>{m(n[0].value)},[n]);const p=r===void 0?d:r;return pe("div",{className:Vn["select-wrapper"],children:[U("div",{ref:a,className:zt(Vn.select,c&&Vn["select-focus"],e),style:t,onClick:u,children:o[p]&&o[p].text}),c&&U(rh,{children:U("div",{className:Vn.options,style:h,children:n.map(v=>U("div",{className:zt(Vn.option,p===v.value&&Vn["option-selected"]),onClick:()=>g(v),children:v.text},v.value))})}),U(Dt,{type:"icon-arrow-down",className:Vn.arrow})]})}const u1="_input_1i4y0_1",h1="_icon_1i4y0_35",cs={"input-wrapper":"_input-wrapper_1i4y0_1",input:u1,"with-icon":"_with-icon_1i4y0_31",icon:h1};function f1({className:e,style:t,value:n,type:r,placeholder:l,maxLength:d,onChange:m,onSearch:c}){const i=K.exports.useRef(""),h=()=>{r==="search"&&c&&c(i.current)};return pe("div",{className:cs["input-wrapper"],children:[U("input",{className:zt(cs.input,r==="search"&&cs["with-icon"],e),placeholder:l,maxLength:d,style:t,value:n,onKeyDown:A=>{A.key==="Enter"&&h()},onChange:A=>{i.current=A.target.value,m&&m(A.target.value),A.target.value===""&&h()}}),r==="search"&&U(Dt,{className:cs.icon,type:"icon-search",onClick:h})]})}const A1={"collection-wrapper":"_collection-wrapper_lhpqc_1"},gA={title:"艺术字",hasMore:!1,items:[{id:"0",type:"material",name:"",internal:!0,tag:"",image:"./fonts/CangErShuYuanTi.png",isFav:!1,isShared:!1,data:{text:"仓耳舒圆体",fontFamily:"CangErShuYuanTi",color:"rgba(255, 255, 255, 1)",strokeColor:"#A63D13",width:200,height:45}},{id:"1",type:"material",name:"",internal:!0,tag:"",image:"./fonts/AlimamaShuHeiTi.png",isFav:!1,isShared:!1,data:{text:"阿里妈妈数黑体",fontFamily:"AlimamaShuHeiTi",width:280,height:45}},{id:"2",type:"material",name:"",internal:!0,tag:"",image:"./fonts/HongLeiZhuoShu.png",isFav:!1,isShared:!1,data:{text:"鸿雷拙书简体",fontFamily:"HongLeiZhuoShu",fontWeight:"bold",width:191,height:45}},{id:"3",type:"material",name:"",internal:!0,tag:"",image:"./fonts/YunFengHanChanTi.png",isFav:!1,isShared:!1,data:{text:"云峰寒蝉体",fontFamily:"YunFengHanChanTi",width:195,height:45}}]};function bo({type:e,noLimit:t=!1,showSearch:n=!0,showDropdown:r=!0,items:l=[],onDropdownItemClick:d,dropdownListGenerator:m}){const c=K.exports.useRef(e==="text"?[gA]:l),i=K.exports.useRef(!1),[h,A]=K.exports.useState(e==="text"?[gA]:l),[a,o]=K.exports.useState(!1),[s,u]=K.exports.useState(!1),g=K.exports.useCallback(async(E,w)=>{const I=ce.current;if(!(!I||i.current)){if(i.current=!0,e==="text"){const S={...E.data,x:w?w.x:0,y:w?w.y:0};delete S.width,delete S.height;const D=await eo.create(S);i.current=!1,I.add(D)}else if(E.type==="template")location.replace(`${location.origin}?id=${E.id}`);else if(E.type==="material")if(E.tag==="背景")I.replaceBackgroundImage(E.image);else for(let S=0;S{A([E]),o(!0)},p=()=>{A(c.current),o(!1)},v=async(E,w)=>{d&&d(E,w)},C=E=>{if(E==="")A(c.current);else{const w=[];c.current.forEach(I=>{if(I.title.indexOf(E)>=0)w.push(I);else{const S=I.items.filter(D=>D.name.indexOf(E)>=0);S.length>0&&w.push({title:I.title,hasMore:!1,items:S})}}),A(w)}u(E!=="")},y=(E,w)=>{E.dataTransfer.setData("text/plain",JSON.stringify(w))};return K.exports.useEffect(()=>{e==="custom"&&(c.current=l,A(l))},[l]),K.exports.useEffect(()=>{const E=(w,I)=>{g(I,{x:w.x-I.data.width/2,y:w.y-I.data.height/2})};return at.on("drop-into-canvas",E),()=>{at.off("drop-into-canvas",E)}},[g]),pe("div",{className:A1["collection-wrapper"],children:[!a&&n&&U(f1,{type:"search",onSearch:C,placeholder:"输入搜索内容"}),h.length===0&&U("div",{className:"no-data",children:"暂无数据"}),h.map((E,w)=>{const I=t||a||s?E.items:E.items.slice(0,4);return pe("div",{className:"collection",children:[a&&!s&&pe("div",{className:"collection-back",onClick:p,children:[U(Dt,{type:"icon-arrow-left"}),E.title]}),!a&&pe("div",{className:"collection-header",children:[E.title&&U("div",{className:"collection-title",children:E.title}),E.hasMore&&pe("div",{className:"collection-more",onClick:()=>f(E),children:["更多 ",U(Dt,{type:"icon-arrow-right"})]})]}),U("div",{className:"collection-items",children:I.map(S=>pe("div",{className:"collection-item",onClick:D=>{D.target.nodeName!=="svg"&&(D.target.classList.contains("collection-dropdown")||g(S))},children:[r&&U(x1,{className:"collection-dropdown",list:m?m(S):[{icon:"icon-heart-fill",text:"收藏",checked:S.isFav}],onItemClick:D=>v(D,S)}),pe("div",{className:"collection-size",children:[S.data.width,"x",S.data.height]}),U("img",{className:"collection-image",src:S.image,onDragStart:D=>y(D,S)}),S.name&&U(y1,{className:"collection-name",children:S.name})]},S.id))})]},w)})]})}const d1="_tabs_ts0m3_1",g1="_tab_ts0m3_1",us={tabs:d1,tab:g1,"tab-slider":"_tab-slider_ts0m3_20"};function p1({tabs:e,onChange:t}){const n=K.exports.useRef(null),r=K.exports.useRef([]),[l,d]=K.exports.useState(0),m=c=>{if(l===c)return;const i=n.current;i&&(i.style.setProperty("--tab-offset",`${r.current[c]}px`),d(c),t&&t(e[c]))};return K.exports.useEffect(()=>{const c=n.current;if(!c)return;const i=[],h=c.getElementsByClassName(us.tab);for(let A=0;AU("div",{className:us.tab,onClick:()=>m(i),children:c.text},c.id))]})}const v1="_inline_8cits_12",m1="_animate_8cits_18",C1="_move_8cits_1",pA={inline:v1,animate:m1,move:C1};function y1({className:e,children:t}){const n=K.exports.useRef(null),[r,l]=K.exports.useState(!1);return K.exports.useEffect(()=>{const d=n.current;if(!d)return;(async()=>{const c=d.parentElement.getBoundingClientRect().width;d.getBoundingClientRect().width>c&&l(!0)})()},[]),U("div",{className:e,style:{overflow:"hidden"},children:U("span",{className:zt(pA.inline,r&&pA.animate),ref:n,children:t})})}const E1="_dropdown_1phsl_1",w1="_option_1phsl_9",I1="_icon_1phsl_24",B1="_checked_1phsl_28",wr={dropdown:E1,option:w1,icon:I1,checked:B1};function x1({className:e,style:t,list:n,onItemClick:r}){const l=K.exports.useRef(null),[d,m]=K.exports.useState({left:0,top:0}),[c,i]=K.exports.useState(!1),h=K.exports.useCallback(()=>{i(!1),window.removeEventListener("click",h)},[]),A=u=>{c?h():(o(),i(!0),setTimeout(()=>{window.addEventListener("click",h)}))},a=(u,g)=>{u.stopPropagation(),r&&r(g),h()},o=K.exports.useCallback(()=>{const u=l.current;if(!u)return;const{x:g,y:f}=u.getBoundingClientRect();m({left:g+32,top:f})},[]);K.exports.useEffect(()=>(o(),window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}),[]);const s=n.filter(u=>u.hide!==!0);return pe("div",{className:zt(wr["dropdown-wrapper"],e),style:t,ref:l,onClick:A,children:[U(Dt,{type:"icon-more"}),c&&U(rh,{children:U("div",{className:wr.dropdown,style:{left:d.left,top:d.top},children:s.map((u,g)=>pe("div",{className:wr.option,onClick:f=>a(f,u),children:[U(Dt,{type:u.icon,className:wr.icon}),U("div",{className:wr.text,children:u.text}),u.checked&&U(Dt,{type:"icon-check",className:wr.checked})]},g))})})]})}const S1="_checked_6ekqq_22",vA={switch:"_switch_6ekqq_1",checked:S1};function mA({checked:e,onChange:t}){const n=()=>{t&&t(!e)};return U("div",{className:zt(vA.switch,e&&vA.checked),onClick:n})}class _o{constructor(t,n){Ce(this,"originWidth");Ce(this,"originHeight");Ce(this,"id",0);Ce(this,"zIndex",0);Ce(this,"config");Ce(this,"instance");this.originWidth=n.originWidth,this.originHeight=n.originHeight,delete n.originWidth,delete n.originHeight,this.instance=t,this.config=n,this.updateConfig=this.updateConfig.bind(this),this.setPosition=this.setPosition.bind(this),this.setScale=this.setScale.bind(this),this.resetSize=this.resetSize.bind(this),this.setAngle=this.setAngle.bind(this),this.setZIndex=this.setZIndex.bind(this),this.remove=this.remove.bind(this),this.instance.on("moving",this.updateConfig),this.instance.on("scaling",this.updateConfig),this.instance.on("rotating",this.updateConfig),setTimeout(()=>{this.setScale(n.width,n.height),n.zIndex>0&&this.setZIndex(n.zIndex)})}updateConfig(){const t=ce.current;if(!t)return;const{left:n=0,top:r=0,scaleX:l=1,scaleY:d=1,angle:m=0}=this.instance;this.config.x=n,this.config.y=r,this.config.width=this.originWidth*l,this.config.height=this.originHeight*d,this.config.angle=m,t.emitUpdateConfig(),t.saveToStack()}getBaseFormItems(){const{x:t,y:n,width:r,height:l}=this.config;return[{id:`${this.id}-position`,type:"double-input",label:["X","Y"],name:"位置",value:[t>>0,n>>0],handler:this.setPosition},{id:`${this.id}-scale`,type:"double-input",label:["宽","高"],name:"大小",value:[r>>0,l>>0],handler:this.setScale},{id:`${this.id}-resize`,type:"button",name:"重置大小",value:"",handler:this.resetSize},{id:`${this.id}-angle`,type:"range",name:"旋转角度",max:360,value:this.config.angle>>0,handler:this.setAngle},{id:`${this.id}-zIndex`,type:"range",name:"层级",max:40,value:this.zIndex,handler:this.setZIndex},{id:`${this.id}-remove`,type:"button",name:"移除组件",value:"",handler:this.remove}]}setPosition(t,n){const r=ce.current;r&&(this.config.x=t,this.config.y=n,this.instance.set("left",t),this.instance.set("top",n),r.saveToStack(),r.render())}setScale(t,n){const r=ce.current;if(!r)return;this.config.width=t,this.config.height=n;const l=t/this.originWidth,d=n/this.originHeight;this.instance.set("scaleX",l),this.instance.set("scaleY",d),this.instance.setCoords(),r.saveToStack(),r.render()}resetSize(){const t=ce.current;t&&(this.setScale(this.originWidth,this.originHeight),this.updateConfig(),t.render())}setAngle(t){const n=ce.current;n&&(t=t>>0,this.config.angle=t,this.instance.set("angle",t),n.saveToStack(),n.render())}setZIndex(t){const n=ce.current;n&&(t=t>>0,this.zIndex=t,n.changeZIndex(this),n.saveToStack(),n.render())}remove(){const t=ce.current;t&&(en.show("使用快捷键 Del 更方便哦~"),t.del())}}const b1={x:0,y:0,radius:0,angle:0,zIndex:1};class ih extends _o{constructor(n,r){super(n,r);Ce(this,"config");Ce(this,"instance");this.instance=n,this.config=r,this.zIndex=r.zIndex,this.replaceImage=this.replaceImage.bind(this),this.setRadius=this.setRadius.bind(this),this.changeFilter=this.changeFilter.bind(this),r.radius>0&&this.setRadius(r.radius)}static async create(n){if(n.imageUrl===""&&n.imageData){const i=document.createElement("canvas");i.width=n.imageData.width,i.height=n.imageData.height,i.getContext("2d").putImageData(n.imageData,0,0),n.imageUrl=i.toDataURL()}const r=document.createElement("img");r.src=n.imageUrl,r.crossOrigin="anonymous",r.onerror=i=>{en.show("图片加载失败")},await new Promise(i=>{r.onload=i});const{width:l,height:d}=r,m=Object.assign({},b1,{width:l,height:d},n),c={width:l,height:d,left:m.x,top:m.y,angle:m.angle,crossOrigin:"anonymous"};return await new Promise(i=>{const h=new Ne.fabric.Image(r,c);i(new ih(h,{imageUrl:m.imageUrl,x:m.x,y:m.y,width:m.width,height:m.height,radius:m.radius,angle:m.angle,filter:m.filter||"",originWidth:l,originHeight:d,zIndex:m.zIndex||0}))})}getFormObject(){const n=this.getBaseFormItems();return{id:this.id,name:"图片",items:[{id:`${this.id}-replaceImage`,type:"upload-image",name:"替换图片",value:"",handler:this.replaceImage},{id:`${this.id}-filter`,type:"select",name:"滤镜",options:[{value:"",text:"原图"},{value:"Grayscale",text:"灰度"},{value:"Invert",text:"反色"},{value:"Sepia",text:"复古"},{value:"Vintage",text:"怀旧"},{value:"Kodachrome",text:"彩色"},{value:"Pixelate",text:"像素化"},{value:"Polaroid",text:"宝丽来"}],value:this.config.filter,handler:this.changeFilter},{id:`${this.id}-radius`,type:"range",name:"圆角",value:this.config.radius,handler:this.setRadius},...n]}}changeFilter(n){const r=ce.current;r&&(this.config.filter=n||"",this.instance.applyFilters(this.config.filter?[new Ne.fabric.Image.filters[this.config.filter]]:[]),r.render(),r.emitUpdateConfig(),r.saveToStack())}setRadius(n){const r=ce.current;if(!r)return;n=n>>0,this.config.radius=n;const l=n/200;this.instance.set("clipPath",new Ne.fabric.Rect({width:this.originWidth,height:this.originHeight,rx:this.originWidth*l,ry:this.originHeight*l,left:-this.originWidth/2,top:-this.originHeight/2})),r.saveToStack(),r.render()}replaceImage(n){const r=ce.current;if(r)return new Promise(l=>{const d=document.createElement("img");d.src=n,d.onload=()=>{const{width:m,height:c}=d;this.config.imageUrl=n,this.instance.setSrc(n,()=>{this.originWidth=m,this.originHeight=c,this.setScale(this.config.width,this.config.height),this.setRadius(this.config.radius),this.config.filter&&this.changeFilter(this.config.filter),r.saveToStack(),l()})},d.onerror=m=>{en.show("图片加载失败")}})}getData(){return{type:"image",zIndex:this.zIndex,config:this.config}}}const Qo=ih,_1={text:"Text",fontSize:40,fontFamily:"Times New Roman",fontWeight:"normal",fontStyle:"normal",color:"rgba(0, 0, 0, 1)",strokeColor:"",pattern:"",underline:!1,linethrough:!1,x:0,y:0,width:0,height:0,angle:0,zIndex:5},Mc=new Set;Mc.add("Times New Roman");class ah extends _o{constructor(n,r){super(n,r);Ce(this,"config");Ce(this,"instance");this.instance=n,this.config=r,this.setText=this.setText.bind(this),this.setFontFamily=this.setFontFamily.bind(this),this.setFontSize=this.setFontSize.bind(this),this.setPattern=this.setPattern.bind(this),this.removePattern=this.removePattern.bind(this),this.setColor=this.setColor.bind(this),this.setStrokeColor=this.setStrokeColor.bind(this),this.fontStyleHandler=this.fontStyleHandler.bind(this),this.updateTextConfig=this.updateTextConfig.bind(this),this.instance.on("editing:exited",this.updateTextConfig),this.instance.on("changed",this.updateTextConfig)}static async create(n){const r=Object.assign({originWidth:0,originHeight:0},_1,n);if(!Mc.has(r.fontFamily)){const m=new FontFace(r.fontFamily,`url(./fonts/${r.fontFamily}.ttf)`);await m.load(),document.fonts.add(m),Mc.add(r.fontFamily)}let l="";r.pattern&&(l=await new Promise(m=>{new Ne.fabric.Pattern({source:r.pattern,repeat:"repeat"},m)}));const d=new Ne.fabric.IText(r.text,{left:r.x,top:r.y,angle:r.angle,fill:l||r.color,stroke:r.strokeColor,fontSize:r.fontSize,fontFamily:r.fontFamily,fontWeight:r.fontWeight,cursorColor:"rgb(0, 0, 0)"});return r.width===0&&(r.width=d.width||0),r.height===0&&(r.height=d.height||0),r.originWidth=d.width||0,r.originHeight=d.height||0,new ah(d,r)}updateTextConfig(){const n=ce.current;if(!n)return;const{text:r="",width:l=0,height:d=0,scaleX:m=1,scaleY:c=1}=this.instance;this.originWidth=l,this.originHeight=d,this.config.width=l*m,this.config.height=d*c,this.config.text=r,n.emitUpdateConfig()}setText(n){const r=ce.current;r&&(this.config.text=n,this.instance.set("text",n),this.updateTextConfig(),r.saveToStack(),r.render())}setFontFamily(n){const r=ce.current;r&&(this.config.fontFamily=n,this.instance.set("fontFamily",n),this.updateTextConfig(),r.saveToStack(),r.render())}setColor(n){const r=ce.current;r&&(this.config.color=n,this.config.pattern===""&&this.instance.set("fill",n),this.updateTextConfig(),r.saveToStack(),r.render())}setPattern(n){const r=ce.current;r&&new Ne.fabric.Pattern({source:n,repeat:"repeat"},l=>{this.config.pattern=n,this.instance.set("fill",l),r.saveToStack(),r.render()})}removePattern(){const n=ce.current;n&&(this.config.pattern="",this.instance.set("fill",this.config.color),n.saveToStack(),n.render())}setStrokeColor(n){const r=ce.current;r&&(this.config.strokeColor=n,this.instance.set("stroke",n),this.updateTextConfig(),r.saveToStack(),r.render())}setFontSize(n){const r=ce.current;r&&(this.config.fontSize=n,this.instance.set("fontSize",n),this.updateTextConfig(),r.saveToStack(),r.render())}fontStyleHandler(n){n==="icon-bold"?this.toggleFontWeight():n==="icon-italic"?this.toggleItalic():n==="icon-underline"?this.toggleUnderline():n==="icon-linethrough"&&this.toggleLinethrough()}toggleFontWeight(){const n=ce.current;n&&(this.config.fontWeight==="normal"?(this.config.fontWeight="bold",this.instance.set("fontWeight","bold")):(this.config.fontWeight="normal",this.instance.set("fontWeight","normal")),this.updateTextConfig(),n.saveToStack(),n.render())}toggleItalic(){const n=ce.current;n&&(this.config.fontStyle==="normal"?(this.config.fontStyle="italic",this.instance.set("fontStyle","italic")):(this.config.fontStyle="normal",this.instance.set("fontStyle","normal")),this.updateTextConfig(),n.saveToStack(),n.render())}toggleUnderline(){const n=ce.current;n&&(this.config.underline=!this.config.underline,this.instance.set("underline",this.config.underline),this.updateTextConfig(),n.saveToStack(),n.render())}toggleLinethrough(){const n=ce.current;n&&(this.config.linethrough=!this.config.linethrough,this.instance.set("linethrough",this.config.linethrough),this.updateTextConfig(),n.saveToStack(),n.render())}getFormObject(){const n=this.getBaseFormItems(),{fontWeight:r,fontStyle:l,underline:d,linethrough:m}=this.config;return{id:this.id,name:"文本",items:[{id:`${this.id}-text`,type:"textarea",name:"内容",value:this.config.text,handler:this.setText},{id:`${this.id}-setPattern`,type:"upload-image",name:"设置填充图片",value:"",handler:this.setPattern},{id:`${this.id}-removePattern`,type:"button",name:"移除填充图片",value:"",handler:this.removePattern},{id:`${this.id}-color`,type:"color",name:"颜色",value:this.config.color,handler:this.setColor},{id:`${this.id}-strokeColor`,type:"color",name:"描边颜色",value:this.config.strokeColor,handler:this.setStrokeColor},{id:`${this.id}-fontSize`,type:"range",name:"字体大小",max:200,value:this.config.fontSize,handler:this.setFontSize},{id:`${this.id}-fontStyle`,type:"icon-bar",name:"字体样式",iconTypes:["icon-bold","icon-italic","icon-underline","icon-linethrough"],labels:["加粗","斜体","下划线","删除线"],value:[r==="bold",l==="italic",d,m],handler:this.fontStyleHandler},...n]}}getData(){return{type:"text",zIndex:this.zIndex,config:this.config}}}const eo=ah,Q1={x:0,y:0,width:200,height:200,fill:"rgba(153, 153, 153, 1)",stroke:"",strokeWidth:0,radius:0,angle:0,zIndex:2};class sh extends _o{constructor(n,r){super(n,r);Ce(this,"config");Ce(this,"instance");this.instance=n,this.config=r,this.zIndex=r.zIndex,this.setFill=this.setFill.bind(this),this.setStrokeWidth=this.setStrokeWidth.bind(this),this.setStroke=this.setStroke.bind(this),this.setRadius=this.setRadius.bind(this)}static async create(n){const r=Object.assign({},Q1,n);return await new Promise(l=>{const d=new Ne.fabric.Rect({left:r.x,top:r.y,width:200,height:200,fill:r.fill,stroke:r.stroke,strokeWidth:r.strokeWidth,rx:r.radius,ry:r.radius,strokeUniform:!0});l(new sh(d,{x:r.x,y:r.y,width:r.width,height:r.height,fill:r.fill,stroke:r.stroke,strokeWidth:r.strokeWidth,angle:r.angle,radius:r.radius,originWidth:r.width,originHeight:r.height,zIndex:r.zIndex||0}))})}getFormObject(){const n=this.getBaseFormItems().filter(r=>r.name!=="重置大小");return{id:this.id,name:"矩形",items:[{id:`${this.id}-fill`,type:"color",name:"填充颜色",value:this.config.fill,handler:this.setFill},{id:`${this.id}-stroke`,type:"color",name:"描边颜色",value:this.config.stroke,handler:this.setStroke},{id:`${this.id}-strokeWidth`,type:"range",name:"描边宽度",value:this.config.strokeWidth,handler:this.setStrokeWidth},{id:`${this.id}-radius`,type:"range",name:"圆角",value:this.config.radius,handler:this.setRadius},...n]}}setRadius(n){const r=ce.current;r&&(n=n>>0,this.config.radius=n,this.instance.set("rx",n),this.instance.set("ry",n),r.saveToStack(),r.emitUpdateConfig(),r.render())}setFill(n){const r=ce.current;r&&(this.config.fill=n,this.instance.set("fill",n),r.saveToStack(),r.emitUpdateConfig(),r.render())}setStrokeWidth(n){const r=ce.current;r&&(this.config.strokeWidth=n,this.instance.set("strokeWidth",n),r.saveToStack(),r.emitUpdateConfig(),r.render())}setStroke(n){const r=ce.current;r&&(this.config.stroke=n,this.instance.set("stroke",n),r.emitUpdateConfig(),r.saveToStack(),r.render())}getData(){return{type:"rect",zIndex:this.zIndex,config:this.config}}}const S0=sh,k1={x:0,y:0,angle:0,zIndex:4};class oh extends _o{constructor(n,r){super(n,r);Ce(this,"config");Ce(this,"instance");this.instance=n,this.config=r,this.zIndex=r.zIndex}static async create(n){const r=Object.assign({},k1,n);return await new Promise(l=>{const d=new Ne.fabric.Path(r.path,{fill:null,stroke:r.color,strokeWidth:r.strokeWidth,left:r.x,top:r.y,angle:r.angle,shadow:r.shadow?new Ne.fabric.Shadow({blur:r.shadow.blur,offsetX:r.shadow.offsetX,offsetY:r.shadow.offsetY,affectStroke:!0,color:r.shadow.color}):void 0,strokeLineCap:"round",strokeLineJoin:"round",strokeMiterLimit:10});l(new oh(d,{path:r.path,x:r.x,y:r.y,width:r.width,height:r.height,strokeWidth:r.strokeWidth,color:r.color,angle:r.angle,shadow:r.shadow,originWidth:r.width,originHeight:r.height,zIndex:r.zIndex||4}))})}getFormObject(){const n=this.getBaseFormItems();return{id:this.id,name:"绘线",items:n.filter(r=>r.name!=="重置大小")}}getData(){return{type:"path",zIndex:this.zIndex,config:this.config}}}const CA=oh,T1="_canvas_eoxbl_1",D1={canvas:T1};function O1(){const e=K.exports.useContext(tf),t=K.exports.useRef(null),n=()=>{const r=ce.current;r&&(r.instance.discardActiveObject(),r.render(),at.emit("selection-change"))};return K.exports.useLayoutEffect(()=>{if(t.current)return e.id!==""?sa.createByJson(t.current,e.data):new sa({width:1280,height:720,canvas:t.current}),()=>{ce.current&&ce.current.destroy()}},[]),K.exports.useEffect(()=>{const r=document.getElementsByClassName("upper-canvas")[0];if(!r)return;r.style.outline="0",r.tabIndex=0;const l=i=>{const h=ce.current;if(!h)return;const A=i.key.toUpperCase();if(A==="DELETE"){h.del();return}i.ctrlKey&&(A==="Z"?h.undo():A==="Y"&&h.redo())},d=i=>{document.body.click(),i.stopPropagation()},m=i=>{i.preventDefault()},c=i=>{if(i.preventDefault(),i.dataTransfer){const h=JSON.parse(i.dataTransfer.getData("text"));at.emit("drop-into-canvas",{x:i.offsetX,y:i.offsetY},h)}};return r.addEventListener("click",d),r.addEventListener("keydown",l),r.addEventListener("dragenter",m),r.addEventListener("dragover",m),r.addEventListener("drop",c),()=>{r.removeEventListener("click",d),r.removeEventListener("keydown",l),r.removeEventListener("dragenter",m),r.removeEventListener("dragover",m),r.removeEventListener("drop",c)}},[]),pe("div",{className:D1.canvas,onClick:n,children:[U("div",{id:"grid",className:"gap"}),U("canvas",{className:"gap",ref:t})]})}const F1="_header_1r0jm_1",M1={header:F1,"save-modal":"_save-modal_1r0jm_49"};class P1{constructor(t,n){this.layerFrame=t,this.parent=n,this.type="Group",this.children=[]}get name(){var t,n;return(n=(t=this.layerFrame)===null||t===void 0?void 0:t.layerProperties.name)!==null&&n!==void 0?n:""}get opacity(){var t,n;return(n=(t=this.layerFrame)===null||t===void 0?void 0:t.layerProperties.opacity)!==null&&n!==void 0?n:0}get composedOpacity(){return this.parent.composedOpacity*(this.opacity/255)}addChild(t){this.children.push(t)}hasChildren(){return this.children.length!==0}freeze(){this.children.forEach(t=>{var n,r;return(r=(n=t).freeze)===null||r===void 0?void 0:r.call(n)}),Object.freeze(this.children)}}var be;(function(e){e.SectionDividerSetting="lsct",e.TypeToolObjectSetting="TySh",e.UnicodeLayerName="luni",e.VectorStrokeData="vstk",e.ObjectBasedEffects="lfx2",e.GradientFillSetting="GdFl",e.SolidColorSheetSetting="SoCo",e.PatternFillSetting="PtFl",e.VectorStrokeContentData="vscg",e.BlendOptionsCapacity="iOpa",e.VectorMaskSetting1="vmsk",e.VectorMaskSetting2="vsms",e.HueSaturation="hue2",e.NestedSectionDividerSetting="lsdk",e.LayerId="lyid",e.ArtboardData="artb",e.SmartObjectPlacedLayerData="SoLE",e.PlacedLayerData="SoLd",e.LinkedLayer="lnkD",e.LinkedLayer2="lnk2",e.LinkedLayer3="lnk3"})(be||(be={}));var Pc;(function(e){e[e.Normal=0]="Normal",e[e.SceneGroup=1]="SceneGroup"})(Pc||(Pc={}));var Rt;(function(e){e[e.ClosedSubpathLength=0]="ClosedSubpathLength",e[e.ClosedSubpathBezierKnotLinked=1]="ClosedSubpathBezierKnotLinked",e[e.ClosedSubpathBezierKnotUnlinked=2]="ClosedSubpathBezierKnotUnlinked",e[e.OpenSubpathLength=3]="OpenSubpathLength",e[e.OpenSubpathBezierKnotLinked=4]="OpenSubpathBezierKnotLinked",e[e.OpenSubpathBezierKnotUnlinked=5]="OpenSubpathBezierKnotUnlinked",e[e.PathFillRule=6]="PathFillRule",e[e.Clipboard=7]="Clipboard",e[e.InitialFillRule=8]="InitialFillRule"})(Rt||(Rt={}));const Lc=(e,t)=>{const n=Math.max(e.length,t.length);for(let r=0;r=2097152)throw new k0;return n*4294967296+r}function mE(e,t){const n=e.getInt32(t),r=e.getUint32(t+4);if(n>=2097152||n<-2097152||n===-2097152&&r===0)throw new k0;return n*4294967296+r}const CE={u8:1,i8:1,u16:2,i16:2,u32:4,i32:4,f32:4,u64:8,i64:8,f64:8};class jn{constructor(t,n=0){this.dataView=t,this.position=n}static from(t){return new jn(new DataView(t.buffer,t.byteOffset,t.byteLength))}get length(){return this.dataView.byteLength}clone(t){const n=t!==void 0?t:this.position;return new jn(new DataView(this.dataView.buffer,this.dataView.byteOffset,this.dataView.byteLength),n)}pass(t){this.position+=t}unpass(t){this.position-=t}extract(t){if(this.position+t>this.dataView.byteLength)throw new Z1;return new Uint8Array(this.dataView.buffer,this.dataView.byteOffset+this.position,t)}iter(){return new Uint8Array(this.dataView.buffer,this.dataView.byteOffset+this.position)}take(t){const n=this.extract(t);return this.pass(t),n}peek(){return this.dataView.getUint8(this.position)}one(){const t=this.dataView.getUint8(this.position);return this.position+=1,t}read(t){const{dataView:n,position:r}=this;switch(this.pass(CE[t]),t){case"u8":return n.getUint8(r);case"u16":return n.getUint16(r);case"u32":return n.getUint32(r);case"u64":return T0(n,r);case"i8":return n.getInt8(r);case"i16":return n.getInt16(r);case"i32":return n.getInt32(r);case"i64":return mE(n,r);case"f32":return n.getFloat32(r);case"f64":return n.getFloat64(r);default:throw new TypeError(`Invalid ReadType: ${t}`)}}readString(t){const n=this.take(t);return new TextDecoder().decode(n)}readUnicodeString(t=4){const n=this.read("u32")*2,r=this.take(n),l=new TextDecoder("utf-16be").decode(r);return this.padding(4+n,t),l.charCodeAt(l.length-1)===0?l.slice(0,-1):l}readFixedPoint32bit(){return this.read("u32")/(1<<16)}readIdString(){const t=this.read("u32");return this.readString(t||4)}padding(t,n){const r=t%n;r>0&&this.pass(n-r)}}const Il=(e,t,n)=>t<=e&&e<=n;function bs(e){return e.bottom-e.top}function yE(e){return e.right-e.left}function wA(e){return yE(e)*bs(e)}var to;(function(e){e.PassThrough="pass",e.Normal="norm",e.Dissolve="diss",e.Darken="dark",e.Multiply="mul ",e.ColorBurn="idiv",e.LinearBurn="lbrn",e.DarkerColor="dkCl",e.Lighten="lite",e.Screen="scrn",e.ColorDodge="div ",e.LinearDodge="lddg",e.LighterColor="lgCl",e.Overlay="over",e.SoftLight="sLit",e.HardLight="hLit",e.VividLight="vLit",e.LinearLight="lLit",e.PinLight="pLit",e.HardMix="hMix",e.Difference="diff",e.Exclusion="smud",e.Subtract="fsub",e.Divide="fdiv",e.Hue="hue ",e.Saturation="sat ",e.Color="colr",e.Luminosity="lum "})(to||(to={}));function D0(e){const t=Object.keys(to);for(const n of t)if(to[n]===e)return e;throw new Y1}var Zr;(function(e){e[e.Base=0]="Base",e[e.NonBase=1]="NonBase"})(Zr||(Zr={}));function EE(e){if(e===Zr.Base)return Zr.Base;if(e===Zr.NonBase)return Zr.NonBase;throw new V1}var Rc;(function(e){e[e.Bitmap=0]="Bitmap",e[e.Grayscale=1]="Grayscale",e[e.Indexed=2]="Indexed",e[e.Rgb=3]="Rgb",e[e.Cmyk=4]="Cmyk",e[e.Multichannel=7]="Multichannel",e[e.Duotone=8]="Duotone",e[e.Lab=9]="Lab"})(Rc||(Rc={}));var Nc;(function(e){e[e.One=1]="One",e[e.Eight=8]="Eight",e[e.Sixteen=16]="Sixteen",e[e.ThirtyTwo=32]="ThirtyTwo"})(Nc||(Nc={}));var Be;(function(e){e.Alias="alis",e.Boolean="bool",e.Class="type",e.Descriptor="Objc",e.Double="doub",e.Enumerated="enum",e.GlobalClass="GlbC",e.GlobalObject="GlbO",e.Integer="long",e.LargeInteger="comp",e.List="VlLs",e.RawData="tdta",e.Reference="obj ",e.String="TEXT",e.UnitFloat="UntF",e.UnitFloats="UnFl",e.ObjectArray="ObAr"})(Be||(Be={}));var Gc;(function(e){e.Angle="#Ang",e.Density="#Rsl",e.Distance="#Rlt",e.Millimeters="#Mlm",e.None="#Nne",e.Percent="#Prc",e.Pixels="#Pxl",e.Points="#Pnt"})(Gc||(Gc={}));function Ir(e,t,n){const r=e.items.get(t);if(!r)throw new cE(`Cannot find key "${t}" in descriptor`);if(r.type!==n)throw new uE(`Unexpected descriptor value type: expected "${n}" but got "${r.type}"`);return r}var vi;(function(e){e[e.PSD=1]="PSD",e[e.PSB=2]="PSB"})(vi||(vi={}));const wE=[56,66,80,83],IE=[0,0,0,0,0,0],BE=[1,8,16,32],xE=1,SE=56,IA=1;function bE(e){const t=new jn(e),n=t.take(4);if(!Lc(n,wE))throw new L1;const r=t.read("u16");if(!(r===vi.PSD||r===vi.PSB))throw new b0;const l=uh(r),d=t.take(6);if(!Lc(d,IE))throw new R1;const m=t.read("u16");if(!Il(m,xE,SE))throw new j1;const c=t.read("u32"),i=t.read("u32");if(!Il(c,IA,l.maxPixels)||!Il(i,IA,l.maxPixels))throw new $1;const h=t.read("u16");if(!BE.includes(h))throw new G1;const A=t.read("u16");if(!(A in Rc))throw new N1;return{channelCount:m,version:r,width:i,height:c,depth:h,colorMode:A}}function _E(e,t,n){const r=(e.length-2)/n,l=e.extract(r),d=n>=2?e.extract(r):void 0,m=n>=3?e.extract(r):void 0,c=n>=4?e.extract(r):void 0;if(t===Nc.Eight)return{red:l,green:d,blue:m,alpha:c};throw new z1(`Unsupported image bit depth: ${t}`)}function QE(e,t,n,r){let l=0,d=0,m=0,c=0;const i=r.rleScanlineLengthFieldReadType;for(let g=0;g=2)for(let g=0;g=3)for(let g=0;g{switch(m){case sn.RawData:return _E(d,t,r);case sn.RleCompressed:return QE(d,r,n,l);default:throw new Q0}})();return{compression:m,red:c,green:i,blue:h,alpha:A}}function TE(e){const t=e.read("u32");if(t!==1)throw new eE;const n=e.read("u32"),r=e.read("u32"),l=e.read("u32"),d=[];for(let m=0;m0&&e.pass(A),{id:n,name:r,resource:i}}function RE(e,t=0){const n=e.read("u8"),r=e.readString(n);if(t){const l=(n+1)%t;l>0&&e.pass(t-l)}return r}const O0=(e,t,n)=>{const{top:r,left:l,bottom:d,right:m,opacity:c,clipping:i,hidden:h,transparencyLocked:A,blendMode:a,layerText:o,engineData:s,maskData:u,additionalLayerInfos:g}=t;return{name:e,top:r,left:l,bottom:d,right:m,opacity:c,clippingMask:i,hidden:h,transparencyLocked:A,blendMode:a,groupId:n,text:o,textProperties:s,maskData:u,additionalLayerProperties:g}};class lh{constructor(t,n){this.channels=t,this.layerProperties=n}static create(t,n,r){const l=O0(t.name,t,r);return new lh(n,l)}get red(){const t=this.channels.get(it.Red);if(t===void 0)throw new X1;return t}get green(){return this.channels.get(it.Green)}get blue(){return this.channels.get(it.Blue)}get alpha(){return this.channels.get(it.TransparencyMask)}get userMask(){return this.channels.get(it.UserSuppliedLayerMask)}get realUserMask(){return this.channels.get(it.RealUserSuppliedLayerMask)}get width(){const{right:t,left:n}=this.layerProperties;return t-n+1}get height(){const{bottom:t,top:n}=this.layerProperties;return t-n+1}}class ch{constructor(t,n){this.id=t,this.layerProperties=n}static create(t,n,r,l){const d=O0(t,r,l);return new ch(n,d)}}function NE(e){return{data:Wt(e)}}function GE(e){return{fillOpacity:e.read("u8")}}function jE(e){return{data:Wt(e)}}function jc(e){const t=e.read("i16"),n=e.read("i16"),r=e.read("i16");return{hue:t,saturation:n,lightness:r}}function $E(e){const t=e.read("i16"),n=e.read("i16"),r=e.read("i16"),l=e.read("i16");return{beginRamp:t,beginSustain:n,endSustain:r,endRamp:l,...jc(e)}}function UE(e){return Array.from(Array(6),()=>$E(e))}function HE(e){const t=e.read("u16"),n=e.read("u8");e.pass(1);const r=jc(e),l=jc(e);return{version:t,colorize:n,colorization:r,master:l,adjustment:n?void 0:UE(e)}}function YE(e){return{value:e.read("u32")}}function zE(e,t){const n=[];let r=0;const l=e.position+t;for(;e.position5?e.readUnicodeString():void 0;return{layerType:t,version:n,uniqueId:r,filename:l,filetype:d,creator:m,data:i,contents:h,uuid:A}}function XE(e){const t=e.read("u8");return e.readString(t)}function VE(e){const t=e.read("u32"),n=e.read("u32"),r=ko(e);return{version:t,descriptor:r,descriptorVersion:n}}function JE(e){return{data:Wt(e)}}function KE(e,t){const n=Ow(e.read("u32"));if(t<12)return{dividerType:n};const r=e.readString(4);if(r!=="8BIM")throw new yA(`Invalid Section Divider Setting signature: ${r}`);const l=D0(e.readString(4));if(t<16)return{dividerType:n,dividerSignature:r,blendMode:l};const d=e.read("u32");if(!(d in Pc))throw new yA(`Invalid Section Divider Setting subtype: ${d}`);return{dividerType:n,dividerSignature:r,blendMode:l,subType:d}}function qE(e){const t=e.readString(4),n=e.read("u32");return{data:Wt(e),version:n,identifier:t}}function ZE(e){const t=e.read("u32"),n=ko(e);return{version:t,data:n}}function ew(e){const t=e.read("u16");if(t!==1)throw new El(`Invalid type tool object setting version: ${t}`);const n=e.read("f64"),r=e.read("f64"),l=e.read("f64"),d=e.read("f64"),m=e.read("f64"),c=e.read("f64"),i=e.read("u16");if(i!==50)throw new El(`Invalid text version: ${i}`);const h=Wt(e),A=e.read("u16");if(A!==1)throw new El(`Invalid warp version: ${A}`);const a=Wt(e),o=e.read("f64"),s=e.read("f64"),u=e.read("f64"),g=e.read("f64");return{version:t,transformXX:n,transformXY:r,transformYX:l,transformYY:d,transformTX:m,transformTY:c,textVersion:i,textData:h,warpVersion:A,warpData:a,left:o,top:s,right:u,bottom:g}}function tw(e){return{name:e.readUnicodeString(0)}}function BA(e){const[t,...n]=e.take(4),r=n[0]*2**16+n[1]*2**8+n[2];return t+r/2**24}function Bl(e){const t=BA(e),n=BA(e);return{vert:t,horiz:n}}function nw(e,t){const n=e.read("i16"),r=e.read("i16"),l=e.read("i16");e.pass(6);const d=e.read("i16");return e.pass(10),{type:t,length:n,operation:r,subpathType:l,index:d}}function rw(e,t){const n=Array(4).map(()=>e.read("f32")),r=e.read("f32");return e.pass(6),{type:t,bounds:n,resolution:r}}function iw(e,t){const n=Boolean(e.read("i16")&1);return e.pass(22),{type:t,fill:n}}function aw(e,t){const n=Bl(e),r=Bl(e),l=Bl(e);return{type:t,preceding:n,anchor:r,leaving:l}}function sw(e){const t=e.read("u16");switch(t){case Rt.OpenSubpathLength:case Rt.ClosedSubpathLength:return nw(e,t);case Rt.PathFillRule:return e.pass(24),{type:t};case Rt.Clipboard:return rw(e,t);case Rt.InitialFillRule:return iw(e,t);case Rt.ClosedSubpathBezierKnotLinked:case Rt.ClosedSubpathBezierKnotUnlinked:case Rt.OpenSubpathBezierKnotLinked:case Rt.OpenSubpathBezierKnotUnlinked:return aw(e,t);default:throw new Error(`Unknown PathRecordType: ${t} (bug in offsets?)`)}}function ow(e,t){const n=Math.floor(t/26);return Array.from(Array(n),()=>sw(e))}function lw(e,t){const n=e.read("u32"),r=e.read("u32"),l=ow(e,t);return{version:n,pathRecords:l,invert:Boolean(r&1),notLink:Boolean(r&2),disable:Boolean(r&4)}}function cw(e){const t=e.read("u32"),n=Wt(e);return{version:t,data:n}}function uw(e){return{data:Wt(e)}}function F0(e,t,n=0){const r=e.readString(4);if(r!=="8BIM"&&r!=="8B64")throw new iE(`Invalid signature: ${r}`);const l=e.readString(4),d=e.read(fw(l,t)),m=e.position,c=hw(e,r,l,d),i=d-(e.position-m);return e.pass(i),e.padding(d,n),c}function hw(e,t,n,r){switch(n){case be.NestedSectionDividerSetting:case be.SectionDividerSetting:return{signature:t,key:n,...KE(e,r)};case be.TypeToolObjectSetting:return{signature:t,key:n,...ew(e)};case be.UnicodeLayerName:return{signature:t,key:n,...tw(e)};case be.VectorStrokeData:return{signature:t,key:n,...uw(e)};case be.ObjectBasedEffects:return{signature:t,key:n,...VE(e)};case be.GradientFillSetting:return{signature:t,key:n,...jE(e)};case be.SolidColorSheetSetting:return{signature:t,key:n,...ZE(e)};case be.PatternFillSetting:return{signature:t,key:n,...JE(e)};case be.VectorStrokeContentData:return{signature:t,key:n,...cw(e)};case be.BlendOptionsCapacity:return{signature:t,key:n,...GE(e)};case be.VectorMaskSetting1:case be.VectorMaskSetting2:return{signature:t,key:n,...lw(e,r)};case be.HueSaturation:return{signature:t,key:n,...HE(e)};case be.LayerId:return{signature:t,key:n,...YE(e)};case be.ArtboardData:return{signature:t,key:n,...NE(e)};case be.PlacedLayerData:case be.SmartObjectPlacedLayerData:return{signature:t,key:n,...qE(e)};case be.LinkedLayer:case be.LinkedLayer2:case be.LinkedLayer3:return{signature:t,key:n,...zE(e,r)};default:{const l=e.take(r);return{signature:t,key:n,_isUnknown:!0,data:l}}}}function fw(e,t){if(t.aliLengthFieldSizeIsVariable)switch(e){case"LMsk":case"Lr16":case"Lr32":case"Layr":case"Mt16":case"Mt32":case"Mtrn":case"Alph":case"FMsk":case"Ink2":case"FEid":case"FXid":case"PxSD":case"cinf":return"u64"}return"u32"}const Aw="8BIM";function dw(e,t,n){const r=[];for(;r.length{const d=Ew(e,l.channelInformation,l,n);return[l,d]}).reverse()}function gw(e,t){const[n,r,l,d]=vw(e),m=e.read("u16"),c=[];for(;c.length0?ww(e,yw(n,c),r.rleScanlineLengthFieldReadType):i);l.set(c,{compression:h,data:A});break}}}return l}function ww(e,t,n){return Array.from(Array(t),()=>e.read(n)).reduce((r,l)=>r+l)}function Iw(e){const t=e.read("u32"),n=e.position,[r,l,d,m]=M0(e),c=e.read("u8"),i=P0(e),h=t>=36?xw(e):void 0,A=i.masksHaveParametersApplied?Bw(e):void 0,a=t-(e.position-n);return e.pass(a),{top:r,left:l,bottom:d,right:m,backgroundColor:c,flags:i,parameters:A,realData:h}}function M0(e){return Array.from(Array(4),()=>e.read("i32"))}var er;(function(e){e[e.PositionRelativeToLayer=1]="PositionRelativeToLayer",e[e.LayerMaskDisabled=2]="LayerMaskDisabled",e[e.InvertMaskWhenBlending=4]="InvertMaskWhenBlending",e[e.UserMaskFromRenderingOtherData=8]="UserMaskFromRenderingOtherData",e[e.MasksHaveParametersApplied=16]="MasksHaveParametersApplied"})(er||(er={}));function P0(e){const t=e.read("u8");return{positionRelativeToLayer:Boolean(t&er.PositionRelativeToLayer),layerMaskDisabled:Boolean(t&er.LayerMaskDisabled),invertMaskWhenBlending:Boolean(t&er.InvertMaskWhenBlending),userMaskFromRenderingOtherData:Boolean(t&er.UserMaskFromRenderingOtherData),masksHaveParametersApplied:Boolean(t&er.MasksHaveParametersApplied)}}var ei;(function(e){e[e.UserMaskDensity=1]="UserMaskDensity",e[e.UserMaskFeather=2]="UserMaskFeather",e[e.VectorMaskDensity=4]="VectorMaskDensity",e[e.VectorMaskFeather=8]="VectorMaskFeather"})(ei||(ei={}));function Bw(e){const t=e.read("u8");return{userMaskDensity:t&ei.UserMaskDensity?e.read("u8"):void 0,userMaskFeather:t&ei.UserMaskFeather?e.read("f64"):void 0,vectorMaskDensity:t&ei.VectorMaskDensity?e.read("u8"):void 0,vectorMaskFeather:t&ei.VectorMaskFeather?e.read("f64"):void 0}}function xw(e){const t=P0(e),n=e.read("u8"),[r,l,d,m]=M0(e);return{top:r,left:l,bottom:d,right:m,flags:t,backgroundColor:n}}function Sw(e,t){const n=new jn(e);n.pass(t.layerAndMaskSectionLengthFieldSize),n.pass(t.layerInfoSectionLengthFieldSize);const r=n.read("i16"),l=Math.abs(r),d=dw(n,l,t);n.padding(n.position,4),n.pass(n.read("u32"));const m=pw(n,t),c=[],i=[],h=[],A=[{startIndex:0,groupId:0,parentGroupId:0}];let a=0;for(let o=0;o0?p.groupId:void 0,C=p.layerRecord||s;i.push(ch.create(C.name,p.groupId,C,v)),h.push("D")}else c.push(lh.create(s,u,g)),h.push("L")}return i.sort((o,s)=>o.id-s.id),{layers:c,groups:i,orders:h,globalAdditionalLayerInformation:m}}const bw=26;function xl(e,t,n=4){const r=(n===4?e.getUint32(t):T0(e,t))+n;return{start:t,end:t+r,size:r}}function _w(e){const t=new DataView(e),n=0,r=bw,l=new DataView(e,n,r),d=bE(l),m=uh(d.version),c=xl(t,n+r),i=xl(t,c.end),h=xl(t,i.end,m.layerAndMaskSectionLengthFieldSize);return{fileHeader:d,colorModeData:new DataView(e,c.size),imageResources:new DataView(e,i.start,i.size),layerAndMaskInformation:new DataView(e,h.start,h.size),imageData:new DataView(e,h.end)}}const Qw={maxPixels:3e4,rleScanlineLengthFieldSize:2,rleScanlineLengthFieldReadType:"u16",layerAndMaskSectionLengthFieldSize:4,layerInfoSectionLengthFieldSize:4,layerRecordSectionChannelLengthFieldReadType:"u32",aliLengthFieldSizeIsVariable:!1},kw={maxPixels:3e5,rleScanlineLengthFieldSize:4,rleScanlineLengthFieldReadType:"u32",layerAndMaskSectionLengthFieldSize:8,layerInfoSectionLengthFieldSize:8,layerRecordSectionChannelLengthFieldReadType:"u64",aliLengthFieldSizeIsVariable:!0};function uh(e){switch(e){case vi.PSD:return Qw;case vi.PSB:return kw;default:throw new b0}}var sn;(function(e){e[e.RawData=0]="RawData",e[e.RleCompressed=1]="RleCompressed",e[e.ZipWithoutPrediction=2]="ZipWithoutPrediction",e[e.ZipWithPrediction=3]="ZipWithPrediction"})(sn||(sn={}));function Tw(e){if(!(e in sn))throw new _0;return e}var it;(function(e){e[e.Red=0]="Red",e[e.Green=1]="Green",e[e.Blue=2]="Blue",e[e.TransparencyMask=-1]="TransparencyMask",e[e.UserSuppliedLayerMask=-2]="UserSuppliedLayerMask",e[e.RealUserSuppliedLayerMask=-3]="RealUserSuppliedLayerMask"})(it||(it={}));function Dw(e){switch(e){case it.Red:return 0;case it.Green:return 1;case it.Blue:return 2;case it.TransparencyMask:return 3;default:throw new W1}}var li;(function(e){e[e.Other=0]="Other",e[e.OpenFolder=1]="OpenFolder",e[e.CloseFolder=2]="CloseFolder",e[e.BoundingSection=3]="BoundingSection"})(li||(li={}));function Ow(e){if(e in li)return e;throw new H1}var $c;(function(e){e[e.Vertical=0]="Vertical",e[e.Horizontal=1]="Horizontal"})($c||($c={}));function Fw(e){if(!(e in $c))throw new tE;return e}var ht;(function(e){e[e.GridAndGuides=1032]="GridAndGuides",e[e.Slices=1050]="Slices",e[e.ICCProfile=1039]="ICCProfile",e[e.GlobalLightAngle=1037]="GlobalLightAngle",e[e.GlobalLightAltitude=1049]="GlobalLightAltitude",e[e.ResolutionInfo=1005]="ResolutionInfo"})(ht||(ht={}));var ci;(function(e){e[e.AutoGenerated=0]="AutoGenerated",e[e.LayerGenerated=1]="LayerGenerated",e[e.UserGenerated=2]="UserGenerated"})(ci||(ci={}));function Mw(e){if(!(e in ci))throw new rE(`Invalid slice origin: ${e}`);return e}var xA;(function(e){e[e.PixelsPerInch=1]="PixelsPerInch",e[e.PixelsPerCM=2]="PixelsPerCM"})(xA||(xA={}));var SA;(function(e){e[e.Inch=1]="Inch",e[e.CM=2]="CM",e[e.Point=3]="Point",e[e.Pica=4]="Pica",e[e.Column=5]="Column"})(SA||(SA={}));var hn;(function(e){e.Class="Clss",e.Enumerated="Enmr",e.Identifier="Idnt",e.Index="indx",e.Name="name",e.Offset="rele",e.Property="prop"})(hn||(hn={}));function bA(e,t=255){if(!(0<=t&&t<=255))throw new K1;const n=e.length/4,r=Dw(it.TransparencyMask),l=t/255;for(let d=0;d{const e="data:application/wasm;base64,AGFzbQEAAAABkgETYAJ/fwF/YAJ/fwBgA39/fwF/YAF/AX9gAX8AYAN/f38AYAAAYAV/f39/fwBgAX8BfmAAAX9gBH9/f38Bf2AEf39/fwBgCH9/f39/f39/AGALf39/f39/f39/f38AYA5/f39/f39/f39/f39/fwBgBn9/f39/fwBgBX9/f39/AX9gB39/f39/f38Bf2ACfn8BfwKYAgUbLi93ZWJ0b29uX3BzZF9kZWNvZGVyX2JnLmpzGl9fd2JnX25ld182OTMyMTZlMTA5MTYyMzk2AAkbLi93ZWJ0b29uX3BzZF9kZWNvZGVyX2JnLmpzHF9fd2JnX3N0YWNrXzBkZGFjYTVkMWFiZmI1MmYAARsuL3dlYnRvb25fcHNkX2RlY29kZXJfYmcuanMcX193YmdfZXJyb3JfMDk5MTk2MjdhYzA5OTJmNQABGy4vd2VidG9vbl9wc2RfZGVjb2Rlcl9iZy5qcxpfX3diaW5kZ2VuX29iamVjdF9kcm9wX3JlZgAEGy4vd2VidG9vbl9wc2RfZGVjb2Rlcl9iZy5qcxBfX3diaW5kZ2VuX3Rocm93AAEDkwGRAQMLAAQCEAoDBAIGAQ4ADAQADxEBDQMAAAABBwISAAEEBAkHAQ4DBw0BBQUBAg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VJcg0AIAAgBmotAABBCkcNACAHQQE6AAAgAyAFTQ0DIAUiACAGaiwAAEG/f0wNBAwFCyADIAVrIQIgAyAFTw0BCwsgB0EAOgAAIAMhBQsgBSADIgBGDQELIAYgA0EAIAUQXgALIAogBiAAIAkoAgwRAgAEQEEBDwsCQCADIABNBEAgACADRg0BDAMLIAAgBmosAABBv39MDQILIAAgBmohBiADIABrIgMNAAtBAA8LIAYgAyAAIAMQXgAL6gUBBX8jAEEgayICJAAgAkEIakECciEFQdytwAAoAgAhAQNAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAQ4EAAIBBAELQdytwABBAkHcrcAAKAIAIgMgASADRiIEGzYCACAEDQIgAyEBDAwLIAFBA3FBAkYEQANAQdyxwAAoAgANBUHcscAAQX82AgBB4LHAACgCACIDRQRAQeCxwAAgARAqIgM2AgALIAMgAygCACIEQQFqNgIAIARBf0wNBkHcscAAQdyxwAAoAgBBAWo2AgAgA0UNByABIQRB3K3AACAFQdytwAAoAgAiASABIARGGzYCACACQQA6ABAgAiADNgIIIAIgBEF8cTYCDCABIARGBEAgAi0AEEUNCQwMCwJAIAIoAggiA0UNACADIAMoAgAiA0F/ajYCACADQQFHDQAgAigCCBBLCyABQQNxQQJGDQAMDAsAC0HlicAAQcAAQZyCwAAQUQALIAJBHGpBADYCACACQbSGwAA2AhggAkIBNwIMIAJB0IrAADYCCCACQQhqQZyCwAAQVwALIAIgAUEBRjoADCACQQM2AgggACACQQhqQaiAwAAoAgARAQBB3K3AACgCACEAQdytwAAgAigCCDYCACACIABBA3EiATYCACABQQJHDQUgAEF+aiIDRQ0AA0AgAygCACEBIANBADYCACABRQ0HIAMoAgQgA0EBOgAIIAFBGGoQJSABIAEoAgAiA0F/ajYCACADQQFGBEAgARBLCyIDDQALCyACQSBqJAAPC0G0hsAAQRAgAkHwhsAAQbCLwAAQOwALAAtB3IfAAEHeAEHYiMAAEIABAAsDQBAPIAItABBFDQALDAILIAJBADYCCCACIAJBCGpB3IrAABB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gAgAUG0hsAANgIYIAFCATcCDCABQZCRwAA2AgggAUEIakGYkcAAEFcACyAALQAEIQIgAEEBOgAEIAEgAkEBcSICOgAHIAINASAAQQRqIQICQAJAAkACQEGUrsAAKAIAQf////8HcQRAEGYhAyAAQQVqLQAARQ0CIANBAXMhAwwBCyAAQQVqLQAARQ0CCyABIAM6AAwgASACNgIIQYCHwABBKyABQQhqQayHwABBqJHAABA7AAsgA0UNAQtBlK7AACgCAEH/////B3FFDQAQZg0AIAJBAToAAQsgAkEAOgAACyABQSBqJAAPCyABQRxqQQA2AgAgAUEYakG0hsAANgIAIAFCATcCDCABQfiOwAA2AgggAUEHaiABQQhqEEUAC28BDH9ByLHAACgCACICRQRAQdixwABB/x82AgBBAA8LQcCxwAAhBgNAIAIiASgCCCECIAEoAgQhAyABKAIAIQQgAUEMaigCABogASEGIAVBAWohBSACDQALQdixwAAgBUH/HyAFQf8fSxs2AgAgCAujAgEDfyAAIAFqIQcCQAJAAkACQANAIAAgB0cEQCAALQAAIQUgAEEBaiIBIQAgBUGAAUYNASAFQRh0QRh1QQBOBEBBACEGIAEhAANAIAAgB0YNBSACIARPDQYgAiADaiAALQAAOgAAIAJBBGohAiAAQQFqIQAgBkH/AXEgBkEBaiEGIAVJDQALDAILIAEgB0YNAkEBIAVrIQUgAUEBaiEAIAEtAAAhBkEAIQEDQCACIARPDQYgAiADaiAGOgAAIAJBBGohAiABQQFqIgFB/wFxIAVB/wFxSQ0ACwwBCwsPC0HEg8AAQTtBgITAABCAAQALQeCCwABBwQBBpIPAABCAAQALQayCwABBGUG0g8AAEIABAAtBrILAAEEZQZCEwAAQgAEAC4oCAgR/AX4jAEEwayICJAAgAUEEaiEEIAEoAgRFBEAgASgCACEDIAJBEGoiBUEANgIAIAJCATcDCCACIAJBCGo2AhQgAkEoaiADQRBqKQIANwMAIAJBIGogA0EIaikCADcDACACIAMpAgA3AxggAkEUakGchsAAIAJBGGoQDhogBEEIaiAFKAIANgIAIAQgAikDCDcCAAsgA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vAQF/IwBBMGsiAiQAIAIgATYCBCACIAA2AgAgAkEcakECNgIAIAJBLGpBETYCACACQgI3AgwgAkGYl8AANgIIIAJBETYCJCACIAJBIGo2AhggAiACQQRqNgIoIAIgAjYCICACQQhqQciXwAAQVwALbAEBfyMAQTBrIgMkACADIAE2AgQgAyAANgIAIANBHGpBAjYCACADQSxqQRE2AgAgA0ICNwIMIANBzJPAADYCCCADQRE2AiQgAyADQSBqNgIYIAMgAzYCKCADIANBBGo2AiAgA0EIaiACEFcAC1YBAn8jAEEgayICJAAgAUEcaigCACEDIAEoAhggAkEYaiAAQRBqKQIANwMAIAJBEGogAEEIaikCADcDACACIAApAgA3AwggAyACQQhqEA4gAkEgaiQAC2YBAX8jAEEgayICJAAgAkHIicAANgIEIAIgADYCACACQRhqIAFBEGopAgA3AwAgAkEQaiABQQhqKQIANwMAIAIgASkCADcDCCACQbyHwAAgAkEEakG8h8AAIAJBCGpBuI/AABAWAAtjAQF/IwBBIGsiAyQAIANB2IrAADYCBCADIAA2AgAgA0EYaiABQRBqKQIANwMAIANBEGogAUEIaikCADcDACADIAEpAgA3AwggA0HMh8AAIANBBGpBzIfAACADQQhqIAIQFgALWQEBfyMAQSBrIgIkACACIAAoAgA2AgQgAkEYaiABQRBqKQIANwMAIAJBEGogAUEIaikCADcDACACIAEpAgA3AwggAkEEakG8hMAAIAJBCGoQDiACQSBqJAALWQEBfyMAQSBrIgIkACACIAAoAgA2AgQgAkEYaiABQRBqKQIANwMAIAJBEGogAUEIaikCADcDACACIAEpAgA3AwggAkEEakGchsAAIAJBCGoQDiACQSBqJAALZwAjAEEwayIBJABB2K3AAC0AAARAIAFBHGpBATYCACABQgI3AgwgAUHki8AANgIIIAFBETYCJCABIAA2AiwgASABQSBqNgIYIAEgAUEsajYCICABQQhqQYyMwAAQVwALIAFBMGokAAtWAQF/IwBBIGsiAiQAIAIgADYCBCACQRhqIAFBEGopAgA3AwAgAkEQaiABQQhqKQIANwMAIAIgASkCADcDCCACQQRqQ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ICBAEgCigGAgQIAQkGAgMuDQECAAcBBgEBUhYCBwECAQJ6BgMBAQIBBwEBSAIDAQEBAAIABTsHAAE/BFEBAAIALgIXAAEBAwQFCAgCBx4ElAMANwQyCAEOARYFAQ8ABwERAgcBAgEFAAcAAT0EAAdtBwBggPAAQdCtwAALAQEAbwlwcm9kdWNlcnMCCGxhbmd1YWdlAQRSdXN0AAxwcm9jZXNzZWQtYnkDBXJ1c3RjHTEuNjEuMCAoZmU1YjEzZDY4IDIwMjItMDUtMTgpBndhbHJ1cwYwLjE5LjAMd2FzbS1iaW5kZ2VuBjAuMi44MA==",t=async(H={},L)=>{let B;if(L.startsWith("data:")){const b=L.replace(/^data:.*?base64,/,"");let Q;if(typeof Buffer=="function"&&typeof Buffer.from=="function")Q=Buffer.from(b,"base64");else if(typeof atob=="function"){const T=atob(b);Q=new Uint8Array(T.length);for(let M=0;M"u"?(0,st.require)("util").TextDecoder:TextDecoder;let i=new c("utf-8",{ignoreBOM:!0,fatal:!0});i.decode();let h=null;function A(){return(h===null||h.buffer!==I.buffer)&&(h=new Uint8Array(I.buffer)),h}function a(H,L){return i.decode(A().subarray(H,H+L))}let o=0;function s(H,L){const B=L(H.length*1);return A().set(H,B/1),o=H.length,B}let u=null;function g(){return(u===null||u.buffer!==I.buffer)&&(u=new Int32Array(I.buffer)),u}function f(H,L){return A().subarray(H/1,H/1+L)}N0=function(H,L,B,b,Q,T,M){try{const F=ee(-16),$=s(L,Z),N=o,X=s(b,Z),q=o,ie=s(T,Z);S(F,H,$,N,B,X,q,Q,ie,o,M);var _=g()[F/4+0],x=g()[F/4+1],O=f(_,x).slice();return te(_,x*1),O}finally{ee(16)}},G0=function(H,L,B,b,Q,T,M,_,x){try{const N=ee(-16),X=s(L,Z),q=o,ie=s(b,Z),G=o,P=s(T,Z),Y=o,W=s(_,Z);D(N,H,X,q,B,ie,G,Q,P,Y,M,W,o,x);var O=g()[N/4+0],F=g()[N/4+1],$=f(O,F).slice();return te(O,F*1),$}finally{ee(16)}},L0=function(H,L,B){try{const M=ee(-16),_=s(L,Z);R(M,H,_,o,B);var b=g()[M/4+0],Q=g()[M/4+1],T=f(b,Q).slice();return te(b,Q*1),T}finally{ee(16)}},R0=function(H,L,B,b,Q){try{const x=ee(-16),O=s(L,Z),F=o,$=s(b,Z);J(x,H,O,F,B,$,o,Q);var T=g()[x/4+0],M=g()[x/4+1],_=f(T,M).slice();return te(T,M*1),_}finally{ee(16)}};function p(H){l===n.length&&n.push(n.length+1);const L=l;return l=n[L],n[L]=H,L}const v=typeof TextEncoder>"u"?(0,st.require)("util").TextEncoder:TextEncoder;let C=new v("utf-8");const y=typeof C.encodeInto=="function"?function(H,L){return C.encodeInto(H,L)}:function(H,L){const B=C.encode(H);return L.set(B),{read:H.length,written:B.length}};function E(H,L,B){if(B===void 0){const _=C.encode(H),x=L(_.length);return A().subarray(x,x+_.length).set(_),o=_.length,x}let b=H.length,Q=L(b);const T=A();let M=0;for(;M127)break;T[Q+M]=_}if(M!==b){M!==0&&(H=H.slice(M)),Q=B(Q,b,b=M+H.length*3);const _=A().subarray(Q+M,Q+b);M+=y(H,_).written}return o=M,Q}QA=function(){const H=new Error;return p(H)},kA=function(H,L){const B=r(L).stack,b=E(B,Z,re),Q=o;g()[H/4+1]=Q,g()[H/4+0]=b},_A=function(H,L){try{}finally{te(H,L)}},TA=function(H){m(H)},DA=function(H,L){throw new Error(a(H,L))};const w=await t({"./webtoon_psd_decoder_bg.js":{__wbg_new_693216e109162396:QA,__wbg_stack_0ddaca5d1abfb52f:kA,__wbg_error_09919627ac0992f5:_A,__wbindgen_object_drop_ref:TA,__wbindgen_throw:DA}},e),I=w.memory;w.main_js;const S=w.decode_rgb,D=w.decode_rgba,R=w.decode_grayscale,J=w.decode_grayscale_a,ee=w.__wbindgen_add_to_stack_pointer,Z=w.__wbindgen_malloc,te=w.__wbindgen_free,re=w.__wbindgen_realloc,oe=w.__wbindgen_start;oe()})();async function Pw(e,t,n,r,l,d){const m=e*t;if(!(m>0&&Number.isInteger(m)))throw new Error(`Pixel count must be a positive integer, got ${m}`);let c;if(r&&l)c=await Lw(m,n,r,l,d);else if(!l&&!r)c=await Uc(m,n,d);else throw new Error(`Missing ${l?"green":"blue"} channel in RGB image`);return new Uint8ClampedArray(c.buffer,c.byteOffset,c.byteLength)}function ti(e){switch(e){case sn.RawData:case sn.RleCompressed:return}throw new Q0(`Unsupported compression method: ${e}`)}async function Lw(e,t,n,r,l){return await j0,ti(t.compression),ti(r.compression),ti(t.compression),l&&ti(l.compression),l?G0(e,t.data,t.compression,n.data,n.compression,r.data,r.compression,l.data,l.compression):N0(e,t.data,t.compression,n.data,n.compression,r.data,r.compression)}async function Uc(e,t,n){return await j0,ti(t.compression),n&&ti(n.compression),n?R0(e,t.data,t.compression,n.data,n.compression):L0(e,t.data,t.compression)}function Rw(e){const t=_w(e),{fileHeader:n}=t,r=uh(n.version),l=PE(t.imageResources),d=Sw(t.layerAndMaskInformation,r),m=kE(t.imageData,n.depth,n.height,n.channelCount,r);return{fileHeader:n,colorModeData:void 0,imageResources:l,layerAndMaskInfo:d,imageData:m}}function ko(e){const t=e.readUnicodeString(0),n=e.readIdString(),r=e.read("u32"),l=new Map;for(;l.size{const m=e.readIdString(),c=Hc(e);return{key:m,value:c}});return{type:t,classObj:{name:n,classId:r},items:d}}case Be.UnitFloats:{const n=OA(e.readString(4)),r=e.read("u32"),l=Array.from(Array(r),()=>e.read("f64"));return{type:t,unitType:n,values:l}}default:throw new sE(`Unexpected descriptor type: ${t}`)}}function Nw(e){const t=e.readString(4);switch(t){case hn.Class:{const n=e.readUnicodeString(0),r=e.readIdString();return{type:t,name:n,classId:r}}case hn.Enumerated:{const n=e.readUnicodeString(0),r=e.readIdString(),l=e.readIdString(),d=e.readIdString();return{type:t,name:n,classId:r,typeId:l,enumValue:d}}case hn.Identifier:{const n=e.readString(4);return{type:t,identifier:n}}case hn.Index:{const n=e.read("u32");return{type:t,index:n}}case hn.Name:{const n=e.readUnicodeString(0);return{type:t,name:n}}case hn.Offset:{const n=e.readUnicodeString(0),r=e.readIdString(),l=e.read("u32");return{type:t,name:n,classId:r,offset:l}}case hn.Property:{const n=e.readUnicodeString(0),r=e.readIdString(),l=e.readIdString();return{type:t,name:n,classId:r,keyId:l}}default:throw new hE(`Invalid reference type: ${t}`)}}function OA(e){if(!Object.values(Gc).includes(e))throw new fE(`Invalid Unit Float type: ${e}`);return e}var je;(function(e){e[e.String=0]="String",e[e.DictBeg=1]="DictBeg",e[e.DictEnd=2]="DictEnd",e[e.ArrBeg=3]="ArrBeg",e[e.ArrEnd=4]="ArrEnd",e[e.Name=5]="Name",e[e.Number=6]="Number",e[e.Boolean=7]="Boolean"})(je||(je={}));const Yc=new Set([0,9,12,32,10,13]),Gw=new Set([102,116]),qt={"(":40,")":41,"<":60,">":62,"[":91,"]":93,"/":47,"\\":92},$0=new Set(Object.values(qt)),U0=[];for(let e=0;e<256;e+=1)U0[e]=Yc.has(e)||$0.has(e);const jw=new TextDecoder("utf-8");function $w(e){const t=e.position;let n=e.position;for(const r of e.iter()){if(U0[r])break;n+=1}return jw.decode(e.take(n-t))}class Uw{constructor(t){this.cursor=jn.from(t)}tokens(){const t=[];for(;!this.done();){const n=this.cursor.one();if(Yc.has(n)){for(;!this.done()&&Yc.has(this.cursor.peek());)this.cursor.pass(1);continue}if($0.has(n)){if(n===qt["("]){t.push({type:je.String,value:this.text()});continue}if(n===qt["["]){t.push({type:je.ArrBeg});continue}if(n===qt["]"]){t.push({type:je.ArrEnd});continue}if(n===qt["<"]){this.cursor.pass(1),t.push({type:je.DictBeg});continue}if(n===qt[">"]){this.cursor.pass(1),t.push({type:je.DictEnd});continue}if(n===qt["/"]){t.push({type:je.Name,value:this.string()});continue}continue}this.cursor.unpass(1),Gw.has(n)?t.push({type:je.Boolean,value:this.boolean()}):t.push({type:je.Number,value:this.number()})}return t}done(){return this.cursor.position>=this.cursor.length}text(){const t=this.cursor.peek();if(t===qt[")"])return this.cursor.pass(1),"";const n=t===255||t===254;let r=new TextDecoder("utf-16be");n&&(r=this.textDecoderFromBOM());const l=[],d=this.cursor.clone();for(;d.peek()!==qt[")"];)if(d.pass(1),d.peek()===qt["\\"]){const i=d.position-this.cursor.position;l.push(r.decode(this.cursor.take(i),{stream:!0})),d.pass(2),this.cursor.pass(1),l.push(r.decode(this.cursor.take(1),{stream:!0}))}const m=d.position-this.cursor.position,c=this.cursor.take(m);return l.push(r.decode(c)),this.cursor.pass(1),l.join("")}textDecoderFromBOM(){const t=this.cursor.one(),n=this.cursor.one();if(t===255&&n===254)return new TextDecoder("utf-16le");if(t===254&&n===255)return new TextDecoder("utf-16be");throw new pE(`Unknown BOM value: [${t}, ${n}]`)}string(){return $w(this.cursor)}number(){const t=this.string(),n=Number(t);if(Number.isNaN(n))throw new dE(`parsing '${t}' as Number failed`);return n}boolean(){const t=this.string();if(t==="true")return!0;if(t==="false")return!1;throw new AE(`'${t}' is neither 'true' nor 'false'`)}}const Sl=Symbol(je[je.ArrBeg]),bl=Symbol(je[je.DictBeg]);class Hw{constructor(t){this.tokens=t,this.stack=[]}parse(){this.runParser();const[t]=this.stack;if(typeof t=="object"&&!Array.isArray(t))return t;throw new gE(`EngineData top-level value is not a dict; is ${typeof t}`)}runParser(){for(const t of this.tokens)switch(t.type){case je.Name:case je.Number:case je.Boolean:case je.String:this.stack.push(t.value);continue;case je.DictBeg:this.stack.push(bl);continue;case je.ArrBeg:this.stack.push(Sl);continue;case je.DictEnd:this.stack.push(this.dict());continue;case je.ArrEnd:this.stack.push(this.array().reverse());continue}}dict(){const t={};for(;;){const n=this.stack.pop();if(n===void 0)throw new EA("Stack empty when parsing dict");if(n===bl)return t;if(n===Sl)throw new wl("Got ArrBeg while parsing a dict");const r=this.stack.pop();if(typeof r!="string")throw new wl(`Dict key is not Name; is ${typeof r}`);t[r]=n}}array(){const t=[];for(;;){const n=this.stack.pop();if(n===void 0)throw new EA("Stack empty when parsing array");if(n===bl)throw new wl("Got DictBeg while parsing array");if(n===Sl)return t;t.push(n)}}}const Yw=new Set(["DocumentResources","EngineDict","ResourceDict"]);function zw(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ww(e){let t=!0;if(typeof e!="object"||!e)return!1;for(const n of Yw)if(zw(e,n)){const r=e[n];t=t&&typeof r=="object"&&!Array.isArray(r)&&Boolean(r)}else return!1;return t}function Xw(e){const t=new Hw(new Uw(e).tokens()).parse();if(Ww(t))return t;throw new vE(`Object with keys ${JSON.stringify(Object.keys(t))} is not valid EngineData`)}class H0{async composite(t=!0,n=!0){const{red:r,green:l,blue:d,alpha:m}=this.imageData,{width:c,height:i}=this,h=await Pw(c,i,r,l,d,m);if(t===!0)if(n===!0){const A=this.composedOpacity*255;return bA(h,A)}else return bA(h,this.opacity);return h}}class Vw extends H0{constructor(t,n){super(),this.layerFrame=t,this.parent=n,this.type="Layer"}get name(){return this.layerFrame.layerProperties.name}get width(){return this.layerFrame.width}get height(){return this.layerFrame.height}get top(){return this.layerFrame.layerProperties.top}get left(){return this.layerFrame.layerProperties.left}get opacity(){return this.layerFrame.layerProperties.opacity}get composedOpacity(){return this.parent.composedOpacity*(this.opacity/255)}get maskData(){return this.layerFrame.layerProperties.maskData}async userMask(){const t=this.layerFrame.userMask;if(t)return Uc(wA(this.maskData),t)}async realUserMask(){const t=this.maskData.realData,n=this.layerFrame.realUserMask;if(!(!t||!n))return Uc(wA(t),n)}get isHidden(){return this.layerFrame.layerProperties.hidden}get isTransparencyLocked(){return this.layerFrame.layerProperties.transparencyLocked}get additionalProperties(){return this.layerFrame.layerProperties.additionalLayerProperties}get text(){return this.layerFrame.layerProperties.text}get textProperties(){return this.layerFrame.layerProperties.textProperties}get imageData(){const{red:t,green:n,blue:r,alpha:l}=this.layerFrame;return{red:t,green:n,blue:r,alpha:l}}}function Jw(e){return e.type==="Psd"||e.type==="Group"}function FA(e){if(!Jw(e))throw new de(`Node (name = '${e.name}', type: '${e.type}') cannot be a parent node`)}class Kw{constructor(t,n,r,l,d){this.origin=t,this.left=n,this.top=r,this.right=l,this.bottom=d}}function qw(e){if(e.resource.descriptor){const t=e.resource.descriptor.descriptor.items.get("slices");if(!(t&&t.type===Be.List))throw new oa('Missing key "slices" in slice descriptor');return t.values.reduce((n,r)=>{if(r.type!==Be.Descriptor)throw new oa(`Slice list contains a non-descriptor (type: ${r.type})`);return n.push(Zw(r.descriptor)),n},[])}else throw new oa("No slice descriptor in slice resource block")}function Zw(e){const t=e2(e),n=Ir(e,"bounds",Be.Descriptor).descriptor,r=Ir(n,"Top ",Be.Integer).value,l=Ir(n,"Left",Be.Integer).value,d=Ir(n,"Btom",Be.Integer).value,m=Ir(n,"Rght",Be.Integer).value;return new Kw(t,l,r,m,d)}function e2(e){const t=Ir(e,"origin",Be.Enumerated);if(t.enumType!=="ESliceOrigin")throw new oa(`Unexpected enum type for slice origin: got "${t.enumType}"`);switch(t.enumValue){case"layerGenerated":return ci.LayerGenerated;case"userGenerated":return ci.UserGenerated;case"autoGenerated":return ci.AutoGenerated;default:throw new oa(`Unexpected enum value for slice origin: got "${t.enumValue}"`)}}class hh extends H0{constructor(t){super(),this.parsingResult=t,this.name="ROOT",this.type="Psd",this.opacity=255,this.composedOpacity=1,this.children=[],this.layers=[],this.guides=[],this.slices=[],this.icc_profile=void 0,this.globalLightAngle=void 0,this.globalLightAltitude=void 0,this.resolutionInfo=void 0,this.additionalLayerProperties=[],this.buildTreeStructure(),this.additionalLayerProperties=t.layerAndMaskInfo.globalAdditionalLayerInformation;for(const n of t.imageResources.resources)if(n.resource!==null)switch(n.id){case ht.GridAndGuides:this.guides=n.resource.guides;break;case ht.Slices:this.slices=qw(n);break;case ht.ICCProfile:this.icc_profile=n.resource;break;case ht.GlobalLightAltitude:this.globalLightAltitude=n.resource;break;case ht.GlobalLightAngle:this.globalLightAngle=n.resource;break;case ht.ResolutionInfo:this.resolutionInfo=n.resource;break}}static parse(t){const n=Rw(t);return new hh(n)}get width(){return this.parsingResult.fileHeader.width}get height(){return this.parsingResult.fileHeader.height}get channelCount(){return this.parsingResult.fileHeader.channelCount}get depth(){return this.parsingResult.fileHeader.depth}get colorMode(){return this.parsingResult.fileHeader.colorMode}get imageData(){const{compression:t,red:n,green:r,blue:l,alpha:d}=this.parsingResult.imageData;return{red:{compression:t,data:n},green:r?{compression:t,data:r}:void 0,blue:l?{compression:t,data:l}:void 0,alpha:d?{compression:t,data:d}:void 0}}buildTreeStructure(){const{groups:t,layers:n,orders:r}=this.parsingResult.layerAndMaskInfo,l=[this];let d=0,m=0;r.forEach(c=>{const i=l[l.length-1];switch(c){case"G":{const h=t[d];FA(i);const A=new P1(h,i);l.push(A),i.children.push(A),d+=1;break}case"L":{const h=n[m];FA(i);const A=new Vw(h,i);this.layers.push(A),i.children.push(A),m+=1;break}case"D":l.pop()}}),l.length=0,this.children.forEach(c=>{var i,h;return(h=(i=c).freeze)===null||h===void 0?void 0:h.call(i)}),Object.freeze(this.children)}}function t2(){const e=K.exports.useContext(tf),[t,n]=K.exports.useState({undo:!1,redo:!1}),r=async()=>{if(!ce.current)return;const o=await ce.current.toImage(),s=document.createElement("a");s.href=o,s.download=`image-${Date.now()}.png`,s.click()},l=async()=>{ce.current&&ce.current.toJson(!0)},d=()=>{location.replace(location.origin)},m=async o=>{const s=o.target.files&&o.target.files[0];if(s!==null){if(o.target.value="",!s.name.endsWith(".psd"))return en.show("请选择正确的文件类型");try{const u=await s.arrayBuffer(),g=hh.parse(u);i(g)}catch{en.show("psd 解析失败")}}},c=o=>{let s=!1;return o.isHidden&&(s=!0),(o.width>3600||o.height>3600)&&(s=!0),s},i=async o=>{var p,v;if(!ce.current)return;const s=o.children,u=C=>{const y=[],E=[];for(let w=C.children.length-1;w>=0;--w){const I=C.children[w];I.type==="Layer"?!c(I)&&y.push(I):I.type==="Group"&&E.push(I)}return E.forEach(w=>{y.push(...u(w))}),y},g=[];for(let C=s.length-1;C>=0;--C){const y=s[C];(v=(p=y==null?void 0:y.layerFrame)==null?void 0:p.layerProperties)!=null&&v.hidden||(y.type==="Group"?g.push(u(y)):y.type==="Layer"&&!c(y)&&g.push([y]))}const f=[];for(let C=0;C{ce.current.add(C)})},h=async o=>{const s=ce.current;if(!s)return;const u=o.target.files&&o.target.files[0];if(u!==null){if(o.target.value="",!u.name.endsWith(".json"))return en.show("请选择正确的文件类型");try{const g=await u.text(),f=JSON.parse(g);s.loadFromJson(f)}catch{en.show("导入失败")}}},A=()=>{!ce.current||!t.undo||(en.show("使用快捷键 Ctrl + Z 更方便哦~"),ce.current.undo())},a=()=>{!ce.current||!t.redo||(en.show("使用快捷键 Ctrl + Y 更方便哦~"),ce.current.redo())};return K.exports.useEffect(()=>(at.on("stack-status",n),()=>{at.off("stack-status",n)}),[]),pe("div",{className:M1.header,children:[pe("div",{className:"header-left",children:[U("div",{className:"title",children:e.name}),U("div",{className:"divider"}),U(Fc,{className:"icon-wrapper",text:"撤销",style:t.undo?void 0:{color:"#999"},position:"bottom",onClick:A,children:U(Dt,{type:"icon-undo"})}),U(Fc,{className:"icon-wrapper",style:t.redo?void 0:{color:"#999"},text:"重做",position:"bottom",onClick:a,children:U(Dt,{type:"icon-redo"})}),e.id!==""&&U(nn,{style:{marginRight:8},onClick:d,children:"新建画布"})]}),pe("div",{className:"header-right",children:[pe(nn,{style:{marginRight:8},children:["从设计图导入",U("input",{className:"hide-input",type:"file",accept:".psd",onChange:m})]}),pe(nn,{style:{marginRight:8},children:["导入",U("input",{className:"hide-input",type:"file",accept:".json",onChange:h})]}),U(nn,{style:{marginRight:8},onClick:r,children:"导出图片"}),U(nn,{type:"primary",onClick:l,children:"保存"})]})]})}const n2="_sidebar_1c5do_1",r2="_tabs_1c5do_6",i2="_main_1c5do_51",_l={sidebar:n2,tabs:r2,main:i2},a2="_template_190z5_1",s2={template:a2};function o2(){return U("div",{className:s2.template,children:U(bo,{type:"template"})})}const l2="_attr_1jnav_1",c2={attr:l2},u2={"double-input":"_double-input_1nolq_1"};function Y0({item:e}){const{name:t,value:n,label:r,handler:l}=e,[d,m]=K.exports.useState(n.map(String)),c=(i,h)=>{let{value:A}=i.target;if(/[^-\d]/.test(A))return;Number(A)>=1e4&&(A="10000");const a=d.slice();a[h]=A,m(a),A!==""&&!isNaN(Number(A))&&l(...a.map(Number))};return K.exports.useEffect(()=>{m(n.map(String))},[n]),pe("div",{className:u2["double-input"],children:[U("div",{className:"name",children:t}),pe("div",{className:"wrapper",children:[U("input",{className:"controlled-input",value:d[0],onChange:i=>c(i,0)}),U("input",{className:"controlled-input",value:d[1],onChange:i=>c(i,1)}),U("div",{className:"label-first",children:r[0]}),U("div",{className:"label-second",children:r[1]})]})]})}const h2={"upload-image":"_upload-image_ozos7_1"};function f2({item:e}){const{name:t,handler:n}=e,r=l=>{const d=l.target.files&&l.target.files[0];if(d===null)return;l.target.value="";const m=new FileReader;m.readAsDataURL(d),m.onload=c=>{const i=c.target.result;n(i)}};return U("div",{className:h2["upload-image"],children:pe(nn,{className:"button",children:[t,U("input",{className:"hide-input",type:"file",accept:"image/*",onChange:r})]})})}const A2="_range_ibvr5_1",d2={range:A2};function zc({item:e}){const{name:t,value:n,min:r=0,max:l=100,handler:d}=e,[m,c]=K.exports.useState(n),i=K.exports.useRef(null),h=s=>{const u=i.current;if(!u)return;const{value:g}=s.target;if(g===""){c(r),d(r),u.style.setProperty("--rail-width","0%");return}if(/[^\d]/.test(g))return;let f=Number(g);f>l?f=l:f{const u=i.current;if(!u)return;const{clientWidth:g,offsetLeft:f}=u;let p=(s.clientX-f)/g;p>1?p=1:p<0&&(p=0),u.style.setProperty("--rail-width",`${p*100}%`);const v=p*l>>0;c(v),d(v)},[]),a=K.exports.useCallback(()=>{window.removeEventListener("mousemove",A),window.removeEventListener("mouseup",a)},[]),o=s=>{if(s.button!==0)return;const u=i.current;if(!u)return;window.addEventListener("mousemove",A),window.addEventListener("mouseup",a);const{clientWidth:g,offsetLeft:f}=u;let p=(s.clientX-f)/g;p>1?p=1:p<0&&(p=0),u.style.setProperty("--rail-width",`${p*100}%`);const v=p*l>>0;c(v),d(v)};return K.exports.useEffect(()=>{const s=i.current;if(!s)return;c(n);const u=(n-r)/l;s.style.setProperty("--rail-width",`${u*100}%`)},[n]),pe("div",{className:d2.range,children:[pe("div",{className:"header-wrapper",children:[U("div",{children:t}),U("input",{className:"range-input",value:m,onChange:h})]}),U("div",{className:"progress",onMouseDown:o,ref:i,children:U("div",{className:"rail",children:U("div",{className:"handle"})})})]})}const g2="_textarea_1390d_1",p2={textarea:g2};function v2({item:e}){const{name:t,value:n,handler:r}=e,[l,d]=K.exports.useState(n),m=c=>{d(c.target.value),r(c.target.value)};return K.exports.useEffect(()=>{d(n)},[n]),pe("div",{className:p2.textarea,children:[U("div",{className:"name",children:t}),U("textarea",{className:"input-area",onChange:m,value:l})]})}const m2="_color_1llze_1",C2={color:m2};var Qt={},Ma={},y2=typeof Ha=="object"&&Ha&&Ha.Object===Object&&Ha,z0=y2,E2=z0,w2=typeof self=="object"&&self&&self.Object===Object&&self,I2=E2||w2||Function("return this")(),ln=I2,B2=ln,x2=B2.Symbol,Pa=x2,MA=Pa,W0=Object.prototype,S2=W0.hasOwnProperty,b2=W0.toString,Gi=MA?MA.toStringTag:void 0;function _2(e){var t=S2.call(e,Gi),n=e[Gi];try{e[Gi]=void 0;var r=!0}catch{}var l=b2.call(e);return r&&(t?e[Gi]=n:delete e[Gi]),l}var Q2=_2,k2=Object.prototype,T2=k2.toString;function D2(e){return T2.call(e)}var O2=D2,PA=Pa,F2=Q2,M2=O2,P2="[object Null]",L2="[object Undefined]",LA=PA?PA.toStringTag:void 0;function R2(e){return e==null?e===void 0?L2:P2:LA&&LA in Object(e)?F2(e):M2(e)}var dr=R2,N2=Array.isArray,Xt=N2;function G2(e){return e!=null&&typeof e=="object"}var En=G2,j2=dr,$2=Xt,U2=En,H2="[object String]";function Y2(e){return typeof e=="string"||!$2(e)&&U2(e)&&j2(e)==H2}var z2=Y2;function W2(e){return function(t,n,r){for(var l=-1,d=Object(t),m=r(t),c=m.length;c--;){var i=m[e?c:++l];if(n(d[i],i,d)===!1)break}return t}}var X2=W2,V2=X2,J2=V2(),K2=J2;function q2(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&e-1&&e%1==0&&e<=dI}var fh=gI,pI=dr,vI=fh,mI=En,CI="[object Arguments]",yI="[object Array]",EI="[object Boolean]",wI="[object Date]",II="[object Error]",BI="[object Function]",xI="[object Map]",SI="[object Number]",bI="[object Object]",_I="[object RegExp]",QI="[object Set]",kI="[object String]",TI="[object WeakMap]",DI="[object ArrayBuffer]",OI="[object DataView]",FI="[object Float32Array]",MI="[object Float64Array]",PI="[object Int8Array]",LI="[object Int16Array]",RI="[object Int32Array]",NI="[object Uint8Array]",GI="[object Uint8ClampedArray]",jI="[object Uint16Array]",$I="[object Uint32Array]",ke={};ke[FI]=ke[MI]=ke[PI]=ke[LI]=ke[RI]=ke[NI]=ke[GI]=ke[jI]=ke[$I]=!0;ke[CI]=ke[yI]=ke[DI]=ke[EI]=ke[OI]=ke[wI]=ke[II]=ke[BI]=ke[xI]=ke[SI]=ke[bI]=ke[_I]=ke[QI]=ke[kI]=ke[TI]=!1;function UI(e){return mI(e)&&vI(e.length)&&!!ke[pI(e)]}var HI=UI;function YI(e){return function(t){return e(t)}}var Ah=YI,ba={exports:{}};(function(e,t){var n=z0,r=t&&!t.nodeType&&t,l=r&&!0&&e&&!e.nodeType&&e,d=l&&l.exports===r,m=d&&n.process,c=function(){try{var i=l&&l.require&&l.require("util").types;return i||m&&m.binding&&m.binding("util")}catch{}}();e.exports=c})(ba,ba.exports);var zI=HI,WI=Ah,NA=ba.exports,GA=NA&&NA.isTypedArray,XI=GA?WI(GA):zI,K0=XI,VI=Z2,JI=V0,KI=Xt,qI=Sa.exports,ZI=J0,eB=K0,tB=Object.prototype,nB=tB.hasOwnProperty;function rB(e,t){var n=KI(e),r=!n&&JI(e),l=!n&&!r&&qI(e),d=!n&&!r&&!l&&eB(e),m=n||r||l||d,c=m?VI(e.length,String):[],i=c.length;for(var h in e)(t||nB.call(e,h))&&!(m&&(h=="length"||l&&(h=="offset"||h=="parent")||d&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||ZI(h,i)))&&c.push(h);return c}var q0=rB,iB=Object.prototype;function aB(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||iB;return e===n}var dh=aB;function sB(e,t){return function(n){return e(t(n))}}var Z0=sB,oB=Z0,lB=oB(Object.keys,Object),cB=lB,uB=dh,hB=cB,fB=Object.prototype,AB=fB.hasOwnProperty;function dB(e){if(!uB(e))return hB(e);var t=[];for(var n in Object(e))AB.call(e,n)&&n!="constructor"&&t.push(n);return t}var gB=dB;function pB(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ei=pB,vB=dr,mB=Ei,CB="[object AsyncFunction]",yB="[object Function]",EB="[object GeneratorFunction]",wB="[object Proxy]";function IB(e){if(!mB(e))return!1;var t=vB(e);return t==yB||t==EB||t==CB||t==wB}var ev=IB,BB=ev,xB=fh;function SB(e){return e!=null&&xB(e.length)&&!BB(e)}var To=SB,bB=q0,_B=gB,QB=To;function kB(e){return QB(e)?bB(e):_B(e)}var La=kB,TB=K2,DB=La;function OB(e,t){return e&&TB(e,t,DB)}var tv=OB;function FB(e){return e}var nv=FB,MB=nv;function PB(e){return typeof e=="function"?e:MB}var LB=PB,RB=tv,NB=LB;function GB(e,t){return e&&RB(e,NB(t))}var gh=GB,jB=Z0,$B=jB(Object.getPrototypeOf,Object),ph=$B,UB=dr,HB=ph,YB=En,zB="[object Object]",WB=Function.prototype,XB=Object.prototype,rv=WB.toString,VB=XB.hasOwnProperty,JB=rv.call(Object);function KB(e){if(!YB(e)||UB(e)!=zB)return!1;var t=HB(e);if(t===null)return!0;var n=VB.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&rv.call(n)==JB}var qB=KB;function ZB(e,t){for(var n=-1,r=e==null?0:e.length,l=Array(r);++n-1}var gx=dx,px=Do;function vx(e,t){var n=this.__data__,r=px(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var mx=vx,Cx=tx,yx=cx,Ex=fx,wx=gx,Ix=mx;function wi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++tc))return!1;var h=d.get(e),A=d.get(t);if(h&&A)return h==t&&A==e;var a=-1,o=!0,s=n&Mb?new Tb:void 0;for(d.set(e,t),d.set(t,e);++a0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,xk.default)(t,function(r){Array.isArray(r)?e(r).map(function(l){return n.push(l)}):(0,Ik.default)(r)?(0,Ek.default)(r,function(l,d){l===!0&&n.push(d),n.push(d+"-"+l)}):(0,Ck.default)(r)&&n.push(r)}),n};Ma.default=Sk;var Ra={};function bk(e,t){for(var n=-1,r=e==null?0:e.length;++n1&&arguments[1]!==void 0?arguments[1]:[],r=t.default&&(0,zD.default)(t.default)||{};return n.map(function(l){var d=t[l];return d&&(0,HD.default)(d,function(m,c){r[c]||(r[c]={}),r[c]=WD({},r[c],d[c])}),l}),r};Ra.default=XD;var Na={};Object.defineProperty(Na,"__esModule",{value:!0});Na.autoprefix=void 0;var VD=gh,yd=KD(VD),JD=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){i4(l,r);function l(){var d,m,c,i;r4(this,l);for(var h=arguments.length,A=Array(h),a=0;a1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){u4(l,r);function l(){var d,m,c,i;c4(this,l);for(var h=arguments.length,A=Array(h),a=0;a1&&arguments[1]!==void 0?arguments[1]:!0;r[m]=c};return t===0&&l("first-child"),t===n-1&&l("last-child"),(t===0||t%2===0)&&l("even"),Math.abs(t%2)===1&&l("odd"),l("nth-child",t),r};bh.default=f4;Object.defineProperty(Qt,"__esModule",{value:!0});Qt.ReactCSS=Qt.loop=Qt.handleActive=_h=Qt.handleHover=Qt.hover=void 0;var A4=Ma,d4=bi(A4),g4=Ra,p4=bi(g4),v4=Na,m4=bi(v4),C4=Ga,_v=bi(C4),y4=ja,E4=bi(y4),w4=bh,I4=bi(w4);function bi(e){return e&&e.__esModule?e:{default:e}}Qt.hover=_v.default;var _h=Qt.handleHover=_v.default;Qt.handleActive=E4.default;Qt.loop=I4.default;var B4=Qt.ReactCSS=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),l=1;lc?o=1:o=Math.round(a*100/c)/100,n.a!==o)return{h:n.h,s:n.s,l:n.l,a:o,source:"rgb"}}else{var s=void 0;if(A<0?s=0:A>m?s=1:s=Math.round(A*100/m)/100,l!==s)return{h:n.h,s:n.s,l:n.l,a:s,source:"rgb"}}return null},Fl={},S4=function(t,n,r,l){if(typeof document>"u"&&!l)return null;var d=l?new l:document.createElement("canvas");d.width=r*2,d.height=r*2;var m=d.getContext("2d");return m?(m.fillStyle=t,m.fillRect(0,0,d.width,d.height),m.fillStyle=n,m.fillRect(0,0,r,r),m.translate(r,r),m.fillRect(0,0,r,r),d.toDataURL()):null},b4=function(t,n,r,l){var d=t+"-"+n+"-"+r+(l?"-server":"");if(Fl[d])return Fl[d];var m=S4(t,n,r,l);return Fl[d]=m,m},Id=Object.assign||function(e){for(var t=1;t{if(i||A===void 0)return;const s=A(o);s instanceof Promise&&(c(!0),s.finally(()=>{c(!1)}))},style:t,children:[i&&U(Dt,{type:"icon-loading",className:cs.loading}),l]})}const Jy="_icon_5ds2t_1",Ky={icon:Jy};function Dt({type:e,className:t,style:n,onClick:r}){const l=zt(Ky.icon,t);return U("svg",{className:l,style:n,onClick:r,children:U("use",{xlinkHref:`#${e}`})})}function rh({children:e}){const t=K.exports.useMemo(()=>{const n=document.getElementById("portal-root");if(!n){const r=document.createElement("div");return r.id="portal-root",document.body.append(r),r}return n},[]);return fu.exports.createPortal(e,t)}const qy="_tips_pdf5z_1",Zy={tips:qy};function Fc({className:e,style:t,visible:n,position:r,text:l,children:A,onClick:m}){const c=K.exports.useRef(null),[i,h]=K.exports.useState(!1),[d,a]=K.exports.useState({left:0,top:0}),o=K.exports.useCallback(()=>{const v=c.current;v&&setTimeout(()=>{const{x:C,y,width:E,height:w}=v.children[0].getBoundingClientRect();a({left:C+E/2,top:r==="bottom"?y+w+12:y-44})})},[r]),s=()=>{h(!0)},u=()=>{h(!1)},g=n===void 0?i:n;K.exports.useEffect(()=>{if(o(),g)return window.addEventListener("mousemove",o),window.addEventListener("mousedown",o),()=>{window.removeEventListener("mousemove",o),window.removeEventListener("mousedown",o)}},[g]);const{left:f,top:p}=d;return pe("div",{ref:c,className:e,style:t,onMouseEnter:s,onMouseLeave:u,onClick:m,children:[A,g&&U(rh,{children:U("div",{className:Zy.tips,style:{left:f,top:p},children:l})})]})}const e1="_loading_myyfb_1",Ad={"loading-wrapper":"_loading-wrapper_myyfb_1",loading:e1,"square-jelly-box-animate":"_square-jelly-box-animate_myyfb_1","square-jelly-box-shadow":"_square-jelly-box-shadow_myyfb_1"};function t1(e){const t=K.exports.useRef(null),n=e.size||96;return K.exports.useLayoutEffect(()=>{const r=t.current;if(!r)return;const l=n/3;r.style.setProperty("--size",`${n}px`),r.style.setProperty("--item-size",`${l}px`)},[]),pe("div",{ref:t,className:Ad["loading-wrapper"],children:[U("div",{className:Ad.loading}),U("div",{style:{marginTop:8},children:"加载中"})]})}const n1="_select_lsl65_1",r1="_sprites_lsl65_26",i1="_options_lsl65_30",a1="_option_lsl65_30",s1="_arrow_lsl65_73",Vn={"select-wrapper":"_select-wrapper_lsl65_1",select:n1,"select-focus":"_select-focus_lsl65_21",sprites:r1,options:i1,option:a1,"option-selected":"_option-selected_lsl65_66",arrow:s1};function o1({className:e,style:t,options:n,value:r,onChange:l}){const[A,m]=K.exports.useState(n[0].value),[c,i]=K.exports.useState(!1),[h,d]=K.exports.useState({left:0,top:0,width:0}),a=K.exports.useRef(null),o=K.exports.useMemo(()=>n.reduce((v,C)=>(v[C.value],v[C.value]=C,v),{}),[n]),s=K.exports.useCallback(()=>{i(!1),window.removeEventListener("click",s)},[]),u=v=>{c?s():(i(!0),setTimeout(()=>{window.addEventListener("click",s)}))},g=v=>{m(v.value),setTimeout(()=>{l&&l(v.value,v)})},f=K.exports.useCallback(()=>{const v=a.current;if(!v)return;const C=v.getBoundingClientRect(),{x:y,y:E,width:w,height:I}=C;d({left:y,top:E+I+8,width:w})},[]);K.exports.useEffect(()=>{if(c)return f(),window.addEventListener("resize",f),()=>{window.removeEventListener("resize",f)}},[c]),K.exports.useLayoutEffect(()=>{m(n[0].value)},[n]);const p=r===void 0?A:r;return pe("div",{className:Vn["select-wrapper"],children:[U("div",{ref:a,className:zt(Vn.select,c&&Vn["select-focus"],e),style:t,onClick:u,children:o[p]&&o[p].text}),c&&U(rh,{children:U("div",{className:Vn.options,style:h,children:n.map(v=>U("div",{className:zt(Vn.option,p===v.value&&Vn["option-selected"]),onClick:()=>g(v),children:v.text},v.value))})}),U(Dt,{type:"icon-arrow-down",className:Vn.arrow})]})}const l1="_input_1i4y0_1",c1="_icon_1i4y0_35",us={"input-wrapper":"_input-wrapper_1i4y0_1",input:l1,"with-icon":"_with-icon_1i4y0_31",icon:c1};function u1({className:e,style:t,value:n,type:r,placeholder:l,maxLength:A,onChange:m,onSearch:c}){const i=K.exports.useRef(""),h=()=>{r==="search"&&c&&c(i.current)};return pe("div",{className:us["input-wrapper"],children:[U("input",{className:zt(us.input,r==="search"&&us["with-icon"],e),placeholder:l,maxLength:A,style:t,value:n,onKeyDown:d=>{d.key==="Enter"&&h()},onChange:d=>{i.current=d.target.value,m&&m(d.target.value),d.target.value===""&&h()}}),r==="search"&&U(Dt,{className:us.icon,type:"icon-search",onClick:h})]})}const h1={"collection-wrapper":"_collection-wrapper_lhpqc_1"},gd={title:"艺术字",hasMore:!1,items:[{id:"0",type:"material",name:"",internal:!0,tag:"",image:"./fonts/CangErShuYuanTi.png",isFav:!1,isShared:!1,data:{text:"仓耳舒圆体",fontFamily:"CangErShuYuanTi",color:"rgba(255, 255, 255, 1)",strokeColor:"#A63D13",width:200,height:45}},{id:"1",type:"material",name:"",internal:!0,tag:"",image:"./fonts/AlimamaShuHeiTi.png",isFav:!1,isShared:!1,data:{text:"阿里妈妈数黑体",fontFamily:"AlimamaShuHeiTi",width:280,height:45}},{id:"2",type:"material",name:"",internal:!0,tag:"",image:"./fonts/HongLeiZhuoShu.png",isFav:!1,isShared:!1,data:{text:"鸿雷拙书简体",fontFamily:"HongLeiZhuoShu",fontWeight:"bold",width:191,height:45}},{id:"3",type:"material",name:"",internal:!0,tag:"",image:"./fonts/YunFengHanChanTi.png",isFav:!1,isShared:!1,data:{text:"云峰寒蝉体",fontFamily:"YunFengHanChanTi",width:195,height:45}}]};function _o({type:e,noLimit:t=!1,showSearch:n=!0,showDropdown:r=!0,items:l=[],onDropdownItemClick:A,dropdownListGenerator:m}){const c=K.exports.useRef(e==="text"?[gd]:l),i=K.exports.useRef(!1),[h,d]=K.exports.useState(e==="text"?[gd]:l),[a,o]=K.exports.useState(!1),[s,u]=K.exports.useState(!1),g=K.exports.useCallback(async(E,w)=>{const I=ce.current;if(!(!I||i.current)){if(i.current=!0,e==="text"){const S={...E.data,x:w?w.x:0,y:w?w.y:0};delete S.width,delete S.height;const D=await to.create(S);i.current=!1,I.add(D)}else if(E.type==="template")location.replace(`${location.origin}?id=${E.id}`);else if(E.type==="material")if(E.tag==="背景")I.replaceBackgroundImage(E.image);else for(let S=0;S{d([E]),o(!0)},p=()=>{d(c.current),o(!1)},v=async(E,w)=>{A&&A(E,w)},C=E=>{if(E==="")d(c.current);else{const w=[];c.current.forEach(I=>{if(I.title.indexOf(E)>=0)w.push(I);else{const S=I.items.filter(D=>D.name.indexOf(E)>=0);S.length>0&&w.push({title:I.title,hasMore:!1,items:S})}}),d(w)}u(E!=="")},y=(E,w)=>{E.dataTransfer.setData("text/plain",JSON.stringify(w))};return K.exports.useEffect(()=>{e==="custom"&&(c.current=l,d(l))},[l]),K.exports.useEffect(()=>{const E=(w,I)=>{g(I,{x:w.x-I.data.width/2,y:w.y-I.data.height/2})};return at.on("drop-into-canvas",E),()=>{at.off("drop-into-canvas",E)}},[g]),pe("div",{className:h1["collection-wrapper"],children:[!a&&n&&U(u1,{type:"search",onSearch:C,placeholder:"输入搜索内容"}),h.length===0&&U("div",{className:"no-data",children:"暂无数据"}),h.map((E,w)=>{const I=t||a||s?E.items:E.items.slice(0,4);return pe("div",{className:"collection",children:[a&&!s&&pe("div",{className:"collection-back",onClick:p,children:[U(Dt,{type:"icon-arrow-left"}),E.title]}),!a&&pe("div",{className:"collection-header",children:[E.title&&U("div",{className:"collection-title",children:E.title}),E.hasMore&&pe("div",{className:"collection-more",onClick:()=>f(E),children:["更多 ",U(Dt,{type:"icon-arrow-right"})]})]}),U("div",{className:"collection-items",children:I.map(S=>pe("div",{className:"collection-item",onClick:D=>{D.target.nodeName!=="svg"&&(D.target.classList.contains("collection-dropdown")||g(S))},children:[r&&U(I1,{className:"collection-dropdown",list:m?m(S):[{icon:"icon-heart-fill",text:"收藏",checked:S.isFav}],onItemClick:D=>v(D,S)}),pe("div",{className:"collection-size",children:[S.data.width,"x",S.data.height]}),U("img",{className:"collection-image",src:S.image,onDragStart:D=>y(D,S)}),S.name&&U(m1,{className:"collection-name",children:S.name})]},S.id))})]},w)})]})}const f1="_tabs_ts0m3_1",d1="_tab_ts0m3_1",hs={tabs:f1,tab:d1,"tab-slider":"_tab-slider_ts0m3_20"};function A1({tabs:e,onChange:t}){const n=K.exports.useRef(null),r=K.exports.useRef([]),[l,A]=K.exports.useState(0),m=c=>{if(l===c)return;const i=n.current;i&&(i.style.setProperty("--tab-offset",`${r.current[c]}px`),A(c),t&&t(e[c]))};return K.exports.useEffect(()=>{const c=n.current;if(!c)return;const i=[],h=c.getElementsByClassName(hs.tab);for(let d=0;dU("div",{className:hs.tab,onClick:()=>m(i),children:c.text},c.id))]})}const g1="_inline_8cits_12",p1="_animate_8cits_18",v1="_move_8cits_1",pd={inline:g1,animate:p1,move:v1};function m1({className:e,children:t}){const n=K.exports.useRef(null),[r,l]=K.exports.useState(!1);return K.exports.useEffect(()=>{const A=n.current;if(!A)return;(async()=>{const c=A.parentElement.getBoundingClientRect().width;A.getBoundingClientRect().width>c&&l(!0)})()},[]),U("div",{className:e,style:{overflow:"hidden"},children:U("span",{className:zt(pd.inline,r&&pd.animate),ref:n,children:t})})}const C1="_dropdown_1phsl_1",y1="_option_1phsl_9",E1="_icon_1phsl_24",w1="_checked_1phsl_28",wr={dropdown:C1,option:y1,icon:E1,checked:w1};function I1({className:e,style:t,list:n,onItemClick:r}){const l=K.exports.useRef(null),[A,m]=K.exports.useState({left:0,top:0}),[c,i]=K.exports.useState(!1),h=K.exports.useCallback(()=>{i(!1),window.removeEventListener("click",h)},[]),d=u=>{c?h():(o(),i(!0),setTimeout(()=>{window.addEventListener("click",h)}))},a=(u,g)=>{u.stopPropagation(),r&&r(g),h()},o=K.exports.useCallback(()=>{const u=l.current;if(!u)return;const{x:g,y:f}=u.getBoundingClientRect();m({left:g+32,top:f})},[]);K.exports.useEffect(()=>(o(),window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}),[]);const s=n.filter(u=>u.hide!==!0);return pe("div",{className:zt(wr["dropdown-wrapper"],e),style:t,ref:l,onClick:d,children:[U(Dt,{type:"icon-more"}),c&&U(rh,{children:U("div",{className:wr.dropdown,style:{left:A.left,top:A.top},children:s.map((u,g)=>pe("div",{className:wr.option,onClick:f=>a(f,u),children:[U(Dt,{type:u.icon,className:wr.icon}),U("div",{className:wr.text,children:u.text}),u.checked&&U(Dt,{type:"icon-check",className:wr.checked})]},g))})})]})}const B1="_checked_6ekqq_22",vd={switch:"_switch_6ekqq_1",checked:B1};function md({checked:e,onChange:t}){const n=()=>{t&&t(!e)};return U("div",{className:zt(vd.switch,e&&vd.checked),onClick:n})}class Qo{constructor(t,n){Ce(this,"originWidth");Ce(this,"originHeight");Ce(this,"id",0);Ce(this,"zIndex",0);Ce(this,"config");Ce(this,"instance");this.originWidth=n.originWidth,this.originHeight=n.originHeight,delete n.originWidth,delete n.originHeight,this.instance=t,this.config=n,this.updateConfig=this.updateConfig.bind(this),this.setPosition=this.setPosition.bind(this),this.setScale=this.setScale.bind(this),this.resetSize=this.resetSize.bind(this),this.setAngle=this.setAngle.bind(this),this.setZIndex=this.setZIndex.bind(this),this.remove=this.remove.bind(this),this.instance.on("moving",this.updateConfig),this.instance.on("scaling",this.updateConfig),this.instance.on("rotating",this.updateConfig),setTimeout(()=>{this.setScale(n.width,n.height),n.zIndex>0&&this.setZIndex(n.zIndex)})}updateConfig(){const t=ce.current;if(!t)return;const{left:n=0,top:r=0,scaleX:l=1,scaleY:A=1,angle:m=0}=this.instance;this.config.x=n,this.config.y=r,this.config.width=this.originWidth*l,this.config.height=this.originHeight*A,this.config.angle=m,t.emitUpdateConfig(),t.saveToStack()}getBaseFormItems(){const{x:t,y:n,width:r,height:l}=this.config;return[{id:`${this.id}-position`,type:"double-input",label:["X","Y"],name:"位置",value:[t>>0,n>>0],handler:this.setPosition},{id:`${this.id}-scale`,type:"double-input",label:["宽","高"],name:"大小",value:[r>>0,l>>0],handler:this.setScale},{id:`${this.id}-resize`,type:"button",name:"重置大小",value:"",handler:this.resetSize},{id:`${this.id}-angle`,type:"range",name:"旋转角度",max:360,value:this.config.angle>>0,handler:this.setAngle},{id:`${this.id}-zIndex`,type:"range",name:"层级",max:40,value:this.zIndex,handler:this.setZIndex},{id:`${this.id}-remove`,type:"button",name:"移除组件",value:"",handler:this.remove}]}setPosition(t,n){const r=ce.current;r&&(this.config.x=t,this.config.y=n,this.instance.set("left",t),this.instance.set("top",n),r.saveToStack(),r.render())}setScale(t,n){const r=ce.current;if(!r)return;this.config.width=t,this.config.height=n;const l=t/this.originWidth,A=n/this.originHeight;this.instance.set("scaleX",l),this.instance.set("scaleY",A),this.instance.setCoords(),r.saveToStack(),r.render()}resetSize(){const t=ce.current;t&&(this.setScale(this.originWidth,this.originHeight),this.updateConfig(),t.render())}setAngle(t){const n=ce.current;n&&(t=t>>0,this.config.angle=t,this.instance.set("angle",t),n.saveToStack(),n.render())}setZIndex(t){const n=ce.current;n&&(t=t>>0,this.zIndex=t,n.changeZIndex(this),n.saveToStack(),n.render())}remove(){const t=ce.current;t&&(en.show("使用快捷键 Del 更方便哦~"),t.del())}}const x1={x:0,y:0,radius:0,angle:0,zIndex:1};class ih extends Qo{constructor(n,r){super(n,r);Ce(this,"config");Ce(this,"instance");this.instance=n,this.config=r,this.zIndex=r.zIndex,this.replaceImage=this.replaceImage.bind(this),this.setRadius=this.setRadius.bind(this),this.changeFilter=this.changeFilter.bind(this),r.radius>0&&this.setRadius(r.radius)}static async create(n){if(n.imageUrl===""&&n.imageData){const i=document.createElement("canvas");i.width=n.imageData.width,i.height=n.imageData.height,i.getContext("2d").putImageData(n.imageData,0,0),n.imageUrl=i.toDataURL()}const r=document.createElement("img");r.src=n.imageUrl,r.crossOrigin="anonymous",r.onerror=i=>{en.show("图片加载失败")},await new Promise(i=>{r.onload=i});const{width:l,height:A}=r,m=Object.assign({},x1,{width:l,height:A},n),c={width:l,height:A,left:m.x,top:m.y,angle:m.angle,crossOrigin:"anonymous"};return await new Promise(i=>{const h=new Ne.fabric.Image(r,c);i(new ih(h,{imageUrl:m.imageUrl,x:m.x,y:m.y,width:m.width,height:m.height,radius:m.radius,angle:m.angle,filter:m.filter||"",originWidth:l,originHeight:A,zIndex:m.zIndex||0}))})}getFormObject(){const n=this.getBaseFormItems();return{id:this.id,name:"图片",items:[{id:`${this.id}-replaceImage`,type:"upload-image",name:"替换图片",value:"",handler:this.replaceImage},{id:`${this.id}-filter`,type:"select",name:"滤镜",options:[{value:"",text:"原图"},{value:"Grayscale",text:"灰度"},{value:"Invert",text:"反色"},{value:"Sepia",text:"复古"},{value:"Vintage",text:"怀旧"},{value:"Kodachrome",text:"彩色"},{value:"Pixelate",text:"像素化"},{value:"Polaroid",text:"宝丽来"}],value:this.config.filter,handler:this.changeFilter},{id:`${this.id}-radius`,type:"range",name:"圆角",value:this.config.radius,handler:this.setRadius},...n]}}changeFilter(n){const r=ce.current;r&&(this.config.filter=n||"",this.instance.applyFilters(this.config.filter?[new Ne.fabric.Image.filters[this.config.filter]]:[]),r.render(),r.emitUpdateConfig(),r.saveToStack())}setRadius(n){const r=ce.current;if(!r)return;n=n>>0,this.config.radius=n;const l=n/200;this.instance.set("clipPath",new Ne.fabric.Rect({width:this.originWidth,height:this.originHeight,rx:this.originWidth*l,ry:this.originHeight*l,left:-this.originWidth/2,top:-this.originHeight/2})),r.saveToStack(),r.render()}replaceImage(n){const r=ce.current;if(r)return new Promise(l=>{const A=document.createElement("img");A.src=n,A.onload=()=>{const{width:m,height:c}=A;this.config.imageUrl=n,this.instance.setSrc(n,()=>{this.originWidth=m,this.originHeight=c,this.setScale(this.config.width,this.config.height),this.setRadius(this.config.radius),this.config.filter&&this.changeFilter(this.config.filter),r.saveToStack(),l()})},A.onerror=m=>{en.show("图片加载失败")}})}getData(){return{type:"image",zIndex:this.zIndex,config:this.config}}}const Ma=ih,S1={text:"Text",fontSize:40,fontFamily:"Times New Roman",fontWeight:"normal",fontStyle:"normal",color:"rgba(0, 0, 0, 1)",strokeColor:"",pattern:"",underline:!1,linethrough:!1,x:0,y:0,width:0,height:0,angle:0,zIndex:5},Mc=new Set;Mc.add("Times New Roman");class ah extends Qo{constructor(n,r){super(n,r);Ce(this,"config");Ce(this,"instance");this.instance=n,this.config=r,this.setText=this.setText.bind(this),this.setFontFamily=this.setFontFamily.bind(this),this.setFontSize=this.setFontSize.bind(this),this.setPattern=this.setPattern.bind(this),this.removePattern=this.removePattern.bind(this),this.setColor=this.setColor.bind(this),this.setStrokeColor=this.setStrokeColor.bind(this),this.fontStyleHandler=this.fontStyleHandler.bind(this),this.updateTextConfig=this.updateTextConfig.bind(this),this.instance.on("editing:exited",this.updateTextConfig),this.instance.on("changed",this.updateTextConfig)}static async create(n){const r=Object.assign({originWidth:0,originHeight:0},S1,n);if(!Mc.has(r.fontFamily)){const m=new FontFace(r.fontFamily,`url(./fonts/${r.fontFamily}.ttf)`);await m.load(),document.fonts.add(m),Mc.add(r.fontFamily)}let l="";r.pattern&&(l=await new Promise(m=>{new Ne.fabric.Pattern({source:r.pattern,repeat:"repeat"},m)}));const A=new Ne.fabric.IText(r.text,{left:r.x,top:r.y,angle:r.angle,fill:l||r.color,stroke:r.strokeColor,fontSize:r.fontSize,fontFamily:r.fontFamily,fontWeight:r.fontWeight,cursorColor:"rgb(0, 0, 0)"});return r.width===0&&(r.width=A.width||0),r.height===0&&(r.height=A.height||0),r.originWidth=A.width||0,r.originHeight=A.height||0,new ah(A,r)}updateTextConfig(){const n=ce.current;if(!n)return;const{text:r="",width:l=0,height:A=0,scaleX:m=1,scaleY:c=1}=this.instance;this.originWidth=l,this.originHeight=A,this.config.width=l*m,this.config.height=A*c,this.config.text=r,n.emitUpdateConfig()}setText(n){const r=ce.current;r&&(this.config.text=n,this.instance.set("text",n),this.updateTextConfig(),r.saveToStack(),r.render())}setFontFamily(n){const r=ce.current;r&&(this.config.fontFamily=n,this.instance.set("fontFamily",n),this.updateTextConfig(),r.saveToStack(),r.render())}setColor(n){const r=ce.current;r&&(this.config.color=n,this.config.pattern===""&&this.instance.set("fill",n),this.updateTextConfig(),r.saveToStack(),r.render())}setPattern(n){const r=ce.current;r&&new Ne.fabric.Pattern({source:n,repeat:"repeat"},l=>{this.config.pattern=n,this.instance.set("fill",l),r.saveToStack(),r.render()})}removePattern(){const n=ce.current;n&&(this.config.pattern="",this.instance.set("fill",this.config.color),n.saveToStack(),n.render())}setStrokeColor(n){const r=ce.current;r&&(this.config.strokeColor=n,this.instance.set("stroke",n),this.updateTextConfig(),r.saveToStack(),r.render())}setFontSize(n){const r=ce.current;r&&(this.config.fontSize=n,this.instance.set("fontSize",n),this.updateTextConfig(),r.saveToStack(),r.render())}fontStyleHandler(n){n==="icon-bold"?this.toggleFontWeight():n==="icon-italic"?this.toggleItalic():n==="icon-underline"?this.toggleUnderline():n==="icon-linethrough"&&this.toggleLinethrough()}toggleFontWeight(){const n=ce.current;n&&(this.config.fontWeight==="normal"?(this.config.fontWeight="bold",this.instance.set("fontWeight","bold")):(this.config.fontWeight="normal",this.instance.set("fontWeight","normal")),this.updateTextConfig(),n.saveToStack(),n.render())}toggleItalic(){const n=ce.current;n&&(this.config.fontStyle==="normal"?(this.config.fontStyle="italic",this.instance.set("fontStyle","italic")):(this.config.fontStyle="normal",this.instance.set("fontStyle","normal")),this.updateTextConfig(),n.saveToStack(),n.render())}toggleUnderline(){const n=ce.current;n&&(this.config.underline=!this.config.underline,this.instance.set("underline",this.config.underline),this.updateTextConfig(),n.saveToStack(),n.render())}toggleLinethrough(){const n=ce.current;n&&(this.config.linethrough=!this.config.linethrough,this.instance.set("linethrough",this.config.linethrough),this.updateTextConfig(),n.saveToStack(),n.render())}getFormObject(){const n=this.getBaseFormItems(),{fontWeight:r,fontStyle:l,underline:A,linethrough:m}=this.config;return{id:this.id,name:"文本",items:[{id:`${this.id}-text`,type:"textarea",name:"内容",value:this.config.text,handler:this.setText},{id:`${this.id}-setPattern`,type:"upload-image",name:"设置填充图片",value:"",handler:this.setPattern},{id:`${this.id}-removePattern`,type:"button",name:"移除填充图片",value:"",handler:this.removePattern},{id:`${this.id}-color`,type:"color",name:"颜色",value:this.config.color,handler:this.setColor},{id:`${this.id}-strokeColor`,type:"color",name:"描边颜色",value:this.config.strokeColor,handler:this.setStrokeColor},{id:`${this.id}-fontSize`,type:"range",name:"字体大小",max:200,value:this.config.fontSize,handler:this.setFontSize},{id:`${this.id}-fontStyle`,type:"icon-bar",name:"字体样式",iconTypes:["icon-bold","icon-italic","icon-underline","icon-linethrough"],labels:["加粗","斜体","下划线","删除线"],value:[r==="bold",l==="italic",A,m],handler:this.fontStyleHandler},...n]}}getData(){return{type:"text",zIndex:this.zIndex,config:this.config}}}const to=ah,b1={x:0,y:0,width:200,height:200,fill:"rgba(153, 153, 153, 1)",stroke:"",strokeWidth:0,radius:0,angle:0,zIndex:2};class sh extends Qo{constructor(n,r){super(n,r);Ce(this,"config");Ce(this,"instance");this.instance=n,this.config=r,this.zIndex=r.zIndex,this.setFill=this.setFill.bind(this),this.setStrokeWidth=this.setStrokeWidth.bind(this),this.setStroke=this.setStroke.bind(this),this.setRadius=this.setRadius.bind(this)}static async create(n){const r=Object.assign({},b1,n);return await new Promise(l=>{const A=new Ne.fabric.Rect({left:r.x,top:r.y,width:200,height:200,fill:r.fill,stroke:r.stroke,strokeWidth:r.strokeWidth,rx:r.radius,ry:r.radius,strokeUniform:!0});l(new sh(A,{x:r.x,y:r.y,width:r.width,height:r.height,fill:r.fill,stroke:r.stroke,strokeWidth:r.strokeWidth,angle:r.angle,radius:r.radius,originWidth:r.width,originHeight:r.height,zIndex:r.zIndex||0}))})}getFormObject(){const n=this.getBaseFormItems().filter(r=>r.name!=="重置大小");return{id:this.id,name:"矩形",items:[{id:`${this.id}-fill`,type:"color",name:"填充颜色",value:this.config.fill,handler:this.setFill},{id:`${this.id}-stroke`,type:"color",name:"描边颜色",value:this.config.stroke,handler:this.setStroke},{id:`${this.id}-strokeWidth`,type:"range",name:"描边宽度",value:this.config.strokeWidth,handler:this.setStrokeWidth},{id:`${this.id}-radius`,type:"range",name:"圆角",value:this.config.radius,handler:this.setRadius},...n]}}setRadius(n){const r=ce.current;r&&(n=n>>0,this.config.radius=n,this.instance.set("rx",n),this.instance.set("ry",n),r.saveToStack(),r.emitUpdateConfig(),r.render())}setFill(n){const r=ce.current;r&&(this.config.fill=n,this.instance.set("fill",n),r.saveToStack(),r.emitUpdateConfig(),r.render())}setStrokeWidth(n){const r=ce.current;r&&(this.config.strokeWidth=n,this.instance.set("strokeWidth",n),r.saveToStack(),r.emitUpdateConfig(),r.render())}setStroke(n){const r=ce.current;r&&(this.config.stroke=n,this.instance.set("stroke",n),r.emitUpdateConfig(),r.saveToStack(),r.render())}getData(){return{type:"rect",zIndex:this.zIndex,config:this.config}}}const S0=sh,_1={x:0,y:0,angle:0,zIndex:4};class oh extends Qo{constructor(n,r){super(n,r);Ce(this,"config");Ce(this,"instance");this.instance=n,this.config=r,this.zIndex=r.zIndex}static async create(n){const r=Object.assign({},_1,n);return await new Promise(l=>{const A=new Ne.fabric.Path(r.path,{fill:null,stroke:r.color,strokeWidth:r.strokeWidth,left:r.x,top:r.y,angle:r.angle,shadow:r.shadow?new Ne.fabric.Shadow({blur:r.shadow.blur,offsetX:r.shadow.offsetX,offsetY:r.shadow.offsetY,affectStroke:!0,color:r.shadow.color}):void 0,strokeLineCap:"round",strokeLineJoin:"round",strokeMiterLimit:10});l(new oh(A,{path:r.path,x:r.x,y:r.y,width:r.width,height:r.height,strokeWidth:r.strokeWidth,color:r.color,angle:r.angle,shadow:r.shadow,originWidth:r.width,originHeight:r.height,zIndex:r.zIndex||4}))})}getFormObject(){const n=this.getBaseFormItems();return{id:this.id,name:"绘线",items:n.filter(r=>r.name!=="重置大小")}}getData(){return{type:"path",zIndex:this.zIndex,config:this.config}}}const Cd=oh,Q1="_canvas_eoxbl_1",k1={canvas:Q1};function T1(){const e=K.exports.useContext(tf),t=K.exports.useRef(null),n=()=>{const r=ce.current;r&&(r.instance.discardActiveObject(),r.render(),at.emit("selection-change"))};return K.exports.useLayoutEffect(()=>{if(t.current)return e.id!==""?sa.createByJson(t.current,e.data):new sa({width:1280,height:720,canvas:t.current}),()=>{ce.current&&ce.current.destroy()}},[]),K.exports.useEffect(()=>{const r=document.getElementsByClassName("upper-canvas")[0];if(!r)return;r.style.outline="0",r.tabIndex=0;const l=i=>{const h=ce.current;if(!h)return;const d=i.key.toUpperCase();if(d==="DELETE"){h.del();return}(i.ctrlKey||i.metaKey)&&(d==="Z"?h.undo():d==="Y"&&h.redo())},A=i=>{document.body.click(),i.stopPropagation()},m=i=>{i.preventDefault()},c=i=>{if(i.preventDefault(),i.dataTransfer){const h=JSON.parse(i.dataTransfer.getData("text"));at.emit("drop-into-canvas",{x:i.offsetX,y:i.offsetY},h)}};return r.addEventListener("click",A),r.addEventListener("keydown",l),r.addEventListener("dragenter",m),r.addEventListener("dragover",m),r.addEventListener("drop",c),()=>{r.removeEventListener("click",A),r.removeEventListener("keydown",l),r.removeEventListener("dragenter",m),r.removeEventListener("dragover",m),r.removeEventListener("drop",c)}},[]),pe("div",{className:k1.canvas,onClick:n,children:[U("div",{id:"grid",className:"gap"}),U("canvas",{className:"gap",ref:t})]})}const D1="_header_1r0jm_1",O1={header:D1,"save-modal":"_save-modal_1r0jm_49"};class F1{constructor(t,n){this.layerFrame=t,this.parent=n,this.type="Group",this.children=[]}get name(){var t,n;return(n=(t=this.layerFrame)===null||t===void 0?void 0:t.layerProperties.name)!==null&&n!==void 0?n:""}get opacity(){var t,n;return(n=(t=this.layerFrame)===null||t===void 0?void 0:t.layerProperties.opacity)!==null&&n!==void 0?n:0}get composedOpacity(){return this.parent.composedOpacity*(this.opacity/255)}addChild(t){this.children.push(t)}hasChildren(){return this.children.length!==0}freeze(){this.children.forEach(t=>{var n,r;return(r=(n=t).freeze)===null||r===void 0?void 0:r.call(n)}),Object.freeze(this.children)}}var be;(function(e){e.SectionDividerSetting="lsct",e.TypeToolObjectSetting="TySh",e.UnicodeLayerName="luni",e.VectorStrokeData="vstk",e.ObjectBasedEffects="lfx2",e.GradientFillSetting="GdFl",e.SolidColorSheetSetting="SoCo",e.PatternFillSetting="PtFl",e.VectorStrokeContentData="vscg",e.BlendOptionsCapacity="iOpa",e.VectorMaskSetting1="vmsk",e.VectorMaskSetting2="vsms",e.HueSaturation="hue2",e.NestedSectionDividerSetting="lsdk",e.LayerId="lyid",e.ArtboardData="artb",e.SmartObjectPlacedLayerData="SoLE",e.PlacedLayerData="SoLd",e.LinkedLayer="lnkD",e.LinkedLayer2="lnk2",e.LinkedLayer3="lnk3"})(be||(be={}));var Pc;(function(e){e[e.Normal=0]="Normal",e[e.SceneGroup=1]="SceneGroup"})(Pc||(Pc={}));var Rt;(function(e){e[e.ClosedSubpathLength=0]="ClosedSubpathLength",e[e.ClosedSubpathBezierKnotLinked=1]="ClosedSubpathBezierKnotLinked",e[e.ClosedSubpathBezierKnotUnlinked=2]="ClosedSubpathBezierKnotUnlinked",e[e.OpenSubpathLength=3]="OpenSubpathLength",e[e.OpenSubpathBezierKnotLinked=4]="OpenSubpathBezierKnotLinked",e[e.OpenSubpathBezierKnotUnlinked=5]="OpenSubpathBezierKnotUnlinked",e[e.PathFillRule=6]="PathFillRule",e[e.Clipboard=7]="Clipboard",e[e.InitialFillRule=8]="InitialFillRule"})(Rt||(Rt={}));const Lc=(e,t)=>{const n=Math.max(e.length,t.length);for(let r=0;r=2097152)throw new k0;return n*4294967296+r}function pE(e,t){const n=e.getInt32(t),r=e.getUint32(t+4);if(n>=2097152||n<-2097152||n===-2097152&&r===0)throw new k0;return n*4294967296+r}const vE={u8:1,i8:1,u16:2,i16:2,u32:4,i32:4,f32:4,u64:8,i64:8,f64:8};class jn{constructor(t,n=0){this.dataView=t,this.position=n}static from(t){return new jn(new DataView(t.buffer,t.byteOffset,t.byteLength))}get length(){return this.dataView.byteLength}clone(t){const n=t!==void 0?t:this.position;return new jn(new DataView(this.dataView.buffer,this.dataView.byteOffset,this.dataView.byteLength),n)}pass(t){this.position+=t}unpass(t){this.position-=t}extract(t){if(this.position+t>this.dataView.byteLength)throw new K1;return new Uint8Array(this.dataView.buffer,this.dataView.byteOffset+this.position,t)}iter(){return new Uint8Array(this.dataView.buffer,this.dataView.byteOffset+this.position)}take(t){const n=this.extract(t);return this.pass(t),n}peek(){return this.dataView.getUint8(this.position)}one(){const t=this.dataView.getUint8(this.position);return this.position+=1,t}read(t){const{dataView:n,position:r}=this;switch(this.pass(vE[t]),t){case"u8":return n.getUint8(r);case"u16":return n.getUint16(r);case"u32":return n.getUint32(r);case"u64":return T0(n,r);case"i8":return n.getInt8(r);case"i16":return n.getInt16(r);case"i32":return n.getInt32(r);case"i64":return pE(n,r);case"f32":return n.getFloat32(r);case"f64":return n.getFloat64(r);default:throw new TypeError(`Invalid ReadType: ${t}`)}}readString(t){const n=this.take(t);return new TextDecoder().decode(n)}readUnicodeString(t=4){const n=this.read("u32")*2,r=this.take(n),l=new TextDecoder("utf-16be").decode(r);return this.padding(4+n,t),l.charCodeAt(l.length-1)===0?l.slice(0,-1):l}readFixedPoint32bit(){return this.read("u32")/(1<<16)}readIdString(){const t=this.read("u32");return this.readString(t||4)}padding(t,n){const r=t%n;r>0&&this.pass(n-r)}}const wl=(e,t,n)=>t<=e&&e<=n;function _s(e){return e.bottom-e.top}function mE(e){return e.right-e.left}function wd(e){return mE(e)*_s(e)}var no;(function(e){e.PassThrough="pass",e.Normal="norm",e.Dissolve="diss",e.Darken="dark",e.Multiply="mul ",e.ColorBurn="idiv",e.LinearBurn="lbrn",e.DarkerColor="dkCl",e.Lighten="lite",e.Screen="scrn",e.ColorDodge="div ",e.LinearDodge="lddg",e.LighterColor="lgCl",e.Overlay="over",e.SoftLight="sLit",e.HardLight="hLit",e.VividLight="vLit",e.LinearLight="lLit",e.PinLight="pLit",e.HardMix="hMix",e.Difference="diff",e.Exclusion="smud",e.Subtract="fsub",e.Divide="fdiv",e.Hue="hue ",e.Saturation="sat ",e.Color="colr",e.Luminosity="lum "})(no||(no={}));function D0(e){const t=Object.keys(no);for(const n of t)if(no[n]===e)return e;throw new U1}var Zr;(function(e){e[e.Base=0]="Base",e[e.NonBase=1]="NonBase"})(Zr||(Zr={}));function CE(e){if(e===Zr.Base)return Zr.Base;if(e===Zr.NonBase)return Zr.NonBase;throw new W1}var Rc;(function(e){e[e.Bitmap=0]="Bitmap",e[e.Grayscale=1]="Grayscale",e[e.Indexed=2]="Indexed",e[e.Rgb=3]="Rgb",e[e.Cmyk=4]="Cmyk",e[e.Multichannel=7]="Multichannel",e[e.Duotone=8]="Duotone",e[e.Lab=9]="Lab"})(Rc||(Rc={}));var Nc;(function(e){e[e.One=1]="One",e[e.Eight=8]="Eight",e[e.Sixteen=16]="Sixteen",e[e.ThirtyTwo=32]="ThirtyTwo"})(Nc||(Nc={}));var Be;(function(e){e.Alias="alis",e.Boolean="bool",e.Class="type",e.Descriptor="Objc",e.Double="doub",e.Enumerated="enum",e.GlobalClass="GlbC",e.GlobalObject="GlbO",e.Integer="long",e.LargeInteger="comp",e.List="VlLs",e.RawData="tdta",e.Reference="obj ",e.String="TEXT",e.UnitFloat="UntF",e.UnitFloats="UnFl",e.ObjectArray="ObAr"})(Be||(Be={}));var Gc;(function(e){e.Angle="#Ang",e.Density="#Rsl",e.Distance="#Rlt",e.Millimeters="#Mlm",e.None="#Nne",e.Percent="#Prc",e.Pixels="#Pxl",e.Points="#Pnt"})(Gc||(Gc={}));function Ir(e,t,n){const r=e.items.get(t);if(!r)throw new oE(`Cannot find key "${t}" in descriptor`);if(r.type!==n)throw new lE(`Unexpected descriptor value type: expected "${n}" but got "${r.type}"`);return r}var vi;(function(e){e[e.PSD=1]="PSD",e[e.PSB=2]="PSB"})(vi||(vi={}));const yE=[56,66,80,83],EE=[0,0,0,0,0,0],wE=[1,8,16,32],IE=1,BE=56,Id=1;function xE(e){const t=new jn(e),n=t.take(4);if(!Lc(n,yE))throw new M1;const r=t.read("u16");if(!(r===vi.PSD||r===vi.PSB))throw new b0;const l=uh(r),A=t.take(6);if(!Lc(A,EE))throw new P1;const m=t.read("u16");if(!wl(m,IE,BE))throw new N1;const c=t.read("u32"),i=t.read("u32");if(!wl(c,Id,l.maxPixels)||!wl(i,Id,l.maxPixels))throw new G1;const h=t.read("u16");if(!wE.includes(h))throw new R1;const d=t.read("u16");if(!(d in Rc))throw new L1;return{channelCount:m,version:r,width:i,height:c,depth:h,colorMode:d}}function SE(e,t,n){const r=(e.length-2)/n,l=e.extract(r),A=n>=2?e.extract(r):void 0,m=n>=3?e.extract(r):void 0,c=n>=4?e.extract(r):void 0;if(t===Nc.Eight)return{red:l,green:A,blue:m,alpha:c};throw new H1(`Unsupported image bit depth: ${t}`)}function bE(e,t,n,r){let l=0,A=0,m=0,c=0;const i=r.rleScanlineLengthFieldReadType;for(let g=0;g=2)for(let g=0;g=3)for(let g=0;g{switch(m){case sn.RawData:return SE(A,t,r);case sn.RleCompressed:return bE(A,r,n,l);default:throw new Q0}})();return{compression:m,red:c,green:i,blue:h,alpha:d}}function QE(e){const t=e.read("u32");if(t!==1)throw new q1;const n=e.read("u32"),r=e.read("u32"),l=e.read("u32"),A=[];for(let m=0;m0&&e.pass(d),{id:n,name:r,resource:i}}function PE(e,t=0){const n=e.read("u8"),r=e.readString(n);if(t){const l=(n+1)%t;l>0&&e.pass(t-l)}return r}const O0=(e,t,n)=>{const{top:r,left:l,bottom:A,right:m,opacity:c,clipping:i,hidden:h,transparencyLocked:d,blendMode:a,layerText:o,engineData:s,maskData:u,additionalLayerInfos:g}=t;return{name:e,top:r,left:l,bottom:A,right:m,opacity:c,clippingMask:i,hidden:h,transparencyLocked:d,blendMode:a,groupId:n,text:o,textProperties:s,maskData:u,additionalLayerProperties:g}};class lh{constructor(t,n){this.channels=t,this.layerProperties=n}static create(t,n,r){const l=O0(t.name,t,r);return new lh(n,l)}get red(){const t=this.channels.get(it.Red);if(t===void 0)throw new z1;return t}get green(){return this.channels.get(it.Green)}get blue(){return this.channels.get(it.Blue)}get alpha(){return this.channels.get(it.TransparencyMask)}get userMask(){return this.channels.get(it.UserSuppliedLayerMask)}get realUserMask(){return this.channels.get(it.RealUserSuppliedLayerMask)}get width(){const{right:t,left:n}=this.layerProperties;return t-n+1}get height(){const{bottom:t,top:n}=this.layerProperties;return t-n+1}}class ch{constructor(t,n){this.id=t,this.layerProperties=n}static create(t,n,r,l){const A=O0(t,r,l);return new ch(n,A)}}function LE(e){return{data:Wt(e)}}function RE(e){return{fillOpacity:e.read("u8")}}function NE(e){return{data:Wt(e)}}function jc(e){const t=e.read("i16"),n=e.read("i16"),r=e.read("i16");return{hue:t,saturation:n,lightness:r}}function GE(e){const t=e.read("i16"),n=e.read("i16"),r=e.read("i16"),l=e.read("i16");return{beginRamp:t,beginSustain:n,endSustain:r,endRamp:l,...jc(e)}}function jE(e){return Array.from(Array(6),()=>GE(e))}function $E(e){const t=e.read("u16"),n=e.read("u8");e.pass(1);const r=jc(e),l=jc(e);return{version:t,colorize:n,colorization:r,master:l,adjustment:n?void 0:jE(e)}}function UE(e){return{value:e.read("u32")}}function HE(e,t){const n=[];let r=0;const l=e.position+t;for(;e.position5?e.readUnicodeString():void 0;return{layerType:t,version:n,uniqueId:r,filename:l,filetype:A,creator:m,data:i,contents:h,uuid:d}}function zE(e){const t=e.read("u8");return e.readString(t)}function WE(e){const t=e.read("u32"),n=e.read("u32"),r=ko(e);return{version:t,descriptor:r,descriptorVersion:n}}function XE(e){return{data:Wt(e)}}function VE(e,t){const n=Tw(e.read("u32"));if(t<12)return{dividerType:n};const r=e.readString(4);if(r!=="8BIM")throw new yd(`Invalid Section Divider Setting signature: ${r}`);const l=D0(e.readString(4));if(t<16)return{dividerType:n,dividerSignature:r,blendMode:l};const A=e.read("u32");if(!(A in Pc))throw new yd(`Invalid Section Divider Setting subtype: ${A}`);return{dividerType:n,dividerSignature:r,blendMode:l,subType:A}}function JE(e){const t=e.readString(4),n=e.read("u32");return{data:Wt(e),version:n,identifier:t}}function KE(e){const t=e.read("u32"),n=ko(e);return{version:t,data:n}}function qE(e){const t=e.read("u16");if(t!==1)throw new yl(`Invalid type tool object setting version: ${t}`);const n=e.read("f64"),r=e.read("f64"),l=e.read("f64"),A=e.read("f64"),m=e.read("f64"),c=e.read("f64"),i=e.read("u16");if(i!==50)throw new yl(`Invalid text version: ${i}`);const h=Wt(e),d=e.read("u16");if(d!==1)throw new yl(`Invalid warp version: ${d}`);const a=Wt(e),o=e.read("f64"),s=e.read("f64"),u=e.read("f64"),g=e.read("f64");return{version:t,transformXX:n,transformXY:r,transformYX:l,transformYY:A,transformTX:m,transformTY:c,textVersion:i,textData:h,warpVersion:d,warpData:a,left:o,top:s,right:u,bottom:g}}function ZE(e){return{name:e.readUnicodeString(0)}}function Bd(e){const[t,...n]=e.take(4),r=n[0]*2**16+n[1]*2**8+n[2];return t+r/2**24}function Il(e){const t=Bd(e),n=Bd(e);return{vert:t,horiz:n}}function ew(e,t){const n=e.read("i16"),r=e.read("i16"),l=e.read("i16");e.pass(6);const A=e.read("i16");return e.pass(10),{type:t,length:n,operation:r,subpathType:l,index:A}}function tw(e,t){const n=Array(4).map(()=>e.read("f32")),r=e.read("f32");return e.pass(6),{type:t,bounds:n,resolution:r}}function nw(e,t){const n=Boolean(e.read("i16")&1);return e.pass(22),{type:t,fill:n}}function rw(e,t){const n=Il(e),r=Il(e),l=Il(e);return{type:t,preceding:n,anchor:r,leaving:l}}function iw(e){const t=e.read("u16");switch(t){case Rt.OpenSubpathLength:case Rt.ClosedSubpathLength:return ew(e,t);case Rt.PathFillRule:return e.pass(24),{type:t};case Rt.Clipboard:return tw(e,t);case Rt.InitialFillRule:return nw(e,t);case Rt.ClosedSubpathBezierKnotLinked:case Rt.ClosedSubpathBezierKnotUnlinked:case Rt.OpenSubpathBezierKnotLinked:case Rt.OpenSubpathBezierKnotUnlinked:return rw(e,t);default:throw new Error(`Unknown PathRecordType: ${t} (bug in offsets?)`)}}function aw(e,t){const n=Math.floor(t/26);return Array.from(Array(n),()=>iw(e))}function sw(e,t){const n=e.read("u32"),r=e.read("u32"),l=aw(e,t);return{version:n,pathRecords:l,invert:Boolean(r&1),notLink:Boolean(r&2),disable:Boolean(r&4)}}function ow(e){const t=e.read("u32"),n=Wt(e);return{version:t,data:n}}function lw(e){return{data:Wt(e)}}function F0(e,t,n=0){const r=e.readString(4);if(r!=="8BIM"&&r!=="8B64")throw new nE(`Invalid signature: ${r}`);const l=e.readString(4),A=e.read(uw(l,t)),m=e.position,c=cw(e,r,l,A),i=A-(e.position-m);return e.pass(i),e.padding(A,n),c}function cw(e,t,n,r){switch(n){case be.NestedSectionDividerSetting:case be.SectionDividerSetting:return{signature:t,key:n,...VE(e,r)};case be.TypeToolObjectSetting:return{signature:t,key:n,...qE(e)};case be.UnicodeLayerName:return{signature:t,key:n,...ZE(e)};case be.VectorStrokeData:return{signature:t,key:n,...lw(e)};case be.ObjectBasedEffects:return{signature:t,key:n,...WE(e)};case be.GradientFillSetting:return{signature:t,key:n,...NE(e)};case be.SolidColorSheetSetting:return{signature:t,key:n,...KE(e)};case be.PatternFillSetting:return{signature:t,key:n,...XE(e)};case be.VectorStrokeContentData:return{signature:t,key:n,...ow(e)};case be.BlendOptionsCapacity:return{signature:t,key:n,...RE(e)};case be.VectorMaskSetting1:case be.VectorMaskSetting2:return{signature:t,key:n,...sw(e,r)};case be.HueSaturation:return{signature:t,key:n,...$E(e)};case be.LayerId:return{signature:t,key:n,...UE(e)};case be.ArtboardData:return{signature:t,key:n,...LE(e)};case be.PlacedLayerData:case be.SmartObjectPlacedLayerData:return{signature:t,key:n,...JE(e)};case be.LinkedLayer:case be.LinkedLayer2:case be.LinkedLayer3:return{signature:t,key:n,...HE(e,r)};default:{const l=e.take(r);return{signature:t,key:n,_isUnknown:!0,data:l}}}}function uw(e,t){if(t.aliLengthFieldSizeIsVariable)switch(e){case"LMsk":case"Lr16":case"Lr32":case"Layr":case"Mt16":case"Mt32":case"Mtrn":case"Alph":case"FMsk":case"Ink2":case"FEid":case"FXid":case"PxSD":case"cinf":return"u64"}return"u32"}const hw="8BIM";function fw(e,t,n){const r=[];for(;r.length{const A=Cw(e,l.channelInformation,l,n);return[l,A]}).reverse()}function dw(e,t){const[n,r,l,A]=gw(e),m=e.read("u16"),c=[];for(;c.length0?yw(e,mw(n,c),r.rleScanlineLengthFieldReadType):i);l.set(c,{compression:h,data:d});break}}}return l}function yw(e,t,n){return Array.from(Array(t),()=>e.read(n)).reduce((r,l)=>r+l)}function Ew(e){const t=e.read("u32"),n=e.position,[r,l,A,m]=M0(e),c=e.read("u8"),i=P0(e),h=t>=36?Iw(e):void 0,d=i.masksHaveParametersApplied?ww(e):void 0,a=t-(e.position-n);return e.pass(a),{top:r,left:l,bottom:A,right:m,backgroundColor:c,flags:i,parameters:d,realData:h}}function M0(e){return Array.from(Array(4),()=>e.read("i32"))}var er;(function(e){e[e.PositionRelativeToLayer=1]="PositionRelativeToLayer",e[e.LayerMaskDisabled=2]="LayerMaskDisabled",e[e.InvertMaskWhenBlending=4]="InvertMaskWhenBlending",e[e.UserMaskFromRenderingOtherData=8]="UserMaskFromRenderingOtherData",e[e.MasksHaveParametersApplied=16]="MasksHaveParametersApplied"})(er||(er={}));function P0(e){const t=e.read("u8");return{positionRelativeToLayer:Boolean(t&er.PositionRelativeToLayer),layerMaskDisabled:Boolean(t&er.LayerMaskDisabled),invertMaskWhenBlending:Boolean(t&er.InvertMaskWhenBlending),userMaskFromRenderingOtherData:Boolean(t&er.UserMaskFromRenderingOtherData),masksHaveParametersApplied:Boolean(t&er.MasksHaveParametersApplied)}}var ei;(function(e){e[e.UserMaskDensity=1]="UserMaskDensity",e[e.UserMaskFeather=2]="UserMaskFeather",e[e.VectorMaskDensity=4]="VectorMaskDensity",e[e.VectorMaskFeather=8]="VectorMaskFeather"})(ei||(ei={}));function ww(e){const t=e.read("u8");return{userMaskDensity:t&ei.UserMaskDensity?e.read("u8"):void 0,userMaskFeather:t&ei.UserMaskFeather?e.read("f64"):void 0,vectorMaskDensity:t&ei.VectorMaskDensity?e.read("u8"):void 0,vectorMaskFeather:t&ei.VectorMaskFeather?e.read("f64"):void 0}}function Iw(e){const t=P0(e),n=e.read("u8"),[r,l,A,m]=M0(e);return{top:r,left:l,bottom:A,right:m,flags:t,backgroundColor:n}}function Bw(e,t){const n=new jn(e);n.pass(t.layerAndMaskSectionLengthFieldSize),n.pass(t.layerInfoSectionLengthFieldSize);const r=n.read("i16"),l=Math.abs(r),A=fw(n,l,t);n.padding(n.position,4),n.pass(n.read("u32"));const m=Aw(n,t),c=[],i=[],h=[],d=[{startIndex:0,groupId:0,parentGroupId:0}];let a=0;for(let o=0;o0?p.groupId:void 0,C=p.layerRecord||s;i.push(ch.create(C.name,p.groupId,C,v)),h.push("D")}else c.push(lh.create(s,u,g)),h.push("L")}return i.sort((o,s)=>o.id-s.id),{layers:c,groups:i,orders:h,globalAdditionalLayerInformation:m}}const xw=26;function Bl(e,t,n=4){const r=(n===4?e.getUint32(t):T0(e,t))+n;return{start:t,end:t+r,size:r}}function Sw(e){const t=new DataView(e),n=0,r=xw,l=new DataView(e,n,r),A=xE(l),m=uh(A.version),c=Bl(t,n+r),i=Bl(t,c.end),h=Bl(t,i.end,m.layerAndMaskSectionLengthFieldSize);return{fileHeader:A,colorModeData:new DataView(e,c.size),imageResources:new DataView(e,i.start,i.size),layerAndMaskInformation:new DataView(e,h.start,h.size),imageData:new DataView(e,h.end)}}const bw={maxPixels:3e4,rleScanlineLengthFieldSize:2,rleScanlineLengthFieldReadType:"u16",layerAndMaskSectionLengthFieldSize:4,layerInfoSectionLengthFieldSize:4,layerRecordSectionChannelLengthFieldReadType:"u32",aliLengthFieldSizeIsVariable:!1},_w={maxPixels:3e5,rleScanlineLengthFieldSize:4,rleScanlineLengthFieldReadType:"u32",layerAndMaskSectionLengthFieldSize:8,layerInfoSectionLengthFieldSize:8,layerRecordSectionChannelLengthFieldReadType:"u64",aliLengthFieldSizeIsVariable:!0};function uh(e){switch(e){case vi.PSD:return bw;case vi.PSB:return _w;default:throw new b0}}var sn;(function(e){e[e.RawData=0]="RawData",e[e.RleCompressed=1]="RleCompressed",e[e.ZipWithoutPrediction=2]="ZipWithoutPrediction",e[e.ZipWithPrediction=3]="ZipWithPrediction"})(sn||(sn={}));function Qw(e){if(!(e in sn))throw new _0;return e}var it;(function(e){e[e.Red=0]="Red",e[e.Green=1]="Green",e[e.Blue=2]="Blue",e[e.TransparencyMask=-1]="TransparencyMask",e[e.UserSuppliedLayerMask=-2]="UserSuppliedLayerMask",e[e.RealUserSuppliedLayerMask=-3]="RealUserSuppliedLayerMask"})(it||(it={}));function kw(e){switch(e){case it.Red:return 0;case it.Green:return 1;case it.Blue:return 2;case it.TransparencyMask:return 3;default:throw new Y1}}var li;(function(e){e[e.Other=0]="Other",e[e.OpenFolder=1]="OpenFolder",e[e.CloseFolder=2]="CloseFolder",e[e.BoundingSection=3]="BoundingSection"})(li||(li={}));function Tw(e){if(e in li)return e;throw new $1}var $c;(function(e){e[e.Vertical=0]="Vertical",e[e.Horizontal=1]="Horizontal"})($c||($c={}));function Dw(e){if(!(e in $c))throw new Z1;return e}var ht;(function(e){e[e.GridAndGuides=1032]="GridAndGuides",e[e.Slices=1050]="Slices",e[e.ICCProfile=1039]="ICCProfile",e[e.GlobalLightAngle=1037]="GlobalLightAngle",e[e.GlobalLightAltitude=1049]="GlobalLightAltitude",e[e.ResolutionInfo=1005]="ResolutionInfo"})(ht||(ht={}));var ci;(function(e){e[e.AutoGenerated=0]="AutoGenerated",e[e.LayerGenerated=1]="LayerGenerated",e[e.UserGenerated=2]="UserGenerated"})(ci||(ci={}));function Ow(e){if(!(e in ci))throw new tE(`Invalid slice origin: ${e}`);return e}var xd;(function(e){e[e.PixelsPerInch=1]="PixelsPerInch",e[e.PixelsPerCM=2]="PixelsPerCM"})(xd||(xd={}));var Sd;(function(e){e[e.Inch=1]="Inch",e[e.CM=2]="CM",e[e.Point=3]="Point",e[e.Pica=4]="Pica",e[e.Column=5]="Column"})(Sd||(Sd={}));var hn;(function(e){e.Class="Clss",e.Enumerated="Enmr",e.Identifier="Idnt",e.Index="indx",e.Name="name",e.Offset="rele",e.Property="prop"})(hn||(hn={}));function bd(e,t=255){if(!(0<=t&&t<=255))throw new V1;const n=e.length/4,r=kw(it.TransparencyMask),l=t/255;for(let A=0;A{const e="data:application/wasm;base64,AGFzbQEAAAABkgETYAJ/fwF/YAJ/fwBgA39/fwF/YAF/AX9gAX8AYAN/f38AYAAAYAV/f39/fwBgAX8BfmAAAX9gBH9/f38Bf2AEf39/fwBgCH9/f39/f39/AGALf39/f39/f39/f38AYA5/f39/f39/f39/f39/fwBgBn9/f39/fwBgBX9/f39/AX9gB39/f39/f38Bf2ACfn8BfwKYAgUbLi93ZWJ0b29uX3BzZF9kZWNvZGVyX2JnLmpzGl9fd2JnX25ld182OTMyMTZlMTA5MTYyMzk2AAkbLi93ZWJ0b29uX3BzZF9kZWNvZGVyX2JnLmpzHF9fd2JnX3N0YWNrXzBkZGFjYTVkMWFiZmI1MmYAARsuL3dlYnRvb25fcHNkX2RlY29kZXJfYmcuanMcX193YmdfZXJyb3JfMDk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iIIKAIAIgtBf3MgC0GKlKjQAHNB//37d2pxIAhBBGooAgAiCEF/cyAIQYqUqNAAc0H//ft3anFyQYCBgoR4cUUEQCAAQQhqIgAgAU0NAQsLIAAgAk0NACAAIAIQiQEACyAAIAJGDQEgACACayECIAAgBGohBEEAIQEDQCABIARqLQAAQQpHBEAgAiABQQFqIgFqDQEMAwsLIAAgAWohAQsCQCABIAVqIgBBAWoiBSAASSADIAVJcg0AIAAgBmotAABBCkcNACAHQQE6AAAgAyAFTQ0DIAUiACAGaiwAAEG/f0wNBAwFCyADIAVrIQIgAyAFTw0BCwsgB0EAOgAAIAMhBQsgBSADIgBGDQELIAYgA0EAIAUQXgALIAogBiAAIAkoAgwRAgAEQEEBDwsCQCADIABNBEAgACADRg0BDAMLIAAgBmosAABBv39MDQILIAAgBmohBiADIABrIgMNAAtBAA8LIAYgAyAAIAMQXgAL6gUBBX8jAEEgayICJAAgAkEIakECciEFQdytwAAoAgAhAQNAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAQ4EAAIBBAELQdytwABBAkHcrcAAKAIAIgMgASADRiIEGzYCACAEDQIgAyEBDAwLIAFBA3FBAkYEQANAQdyxwAAoAgANBUHcscAAQX82AgBB4LHAACgCACIDRQRAQeCxwAAgARAqIgM2AgALIAMgAygCACIEQQFqNgIAIARBf0wNBkHcscAAQdyxwAAoAgBBAWo2AgAgA0UNByABIQRB3K3AACAFQdytwAAoAgAiASABIARGGzYCACACQQA6ABAgAiADNgIIIAIgBEF8cTYCDCABIARGBEAgAi0AEEUNCQwMCwJAIAIoAggiA0UNACADIAMoAgAiA0F/ajYCACADQQFHDQAgAigCCBBLCyABQQNxQQJGDQAMDAsAC0HlicAAQcAAQZyCwAAQUQALIAJBHGpBADYCACACQbSGwAA2AhggAkIBNwIMIAJB0IrAADYCCCACQQhqQZyCwAAQVwALIAIgAUEBRjoADCACQQM2AgggACACQQhqQaiAwAAoAgARAQBB3K3AACgCACEAQdytwAAgAigCCDYCACACIABBA3E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EQCAEQRBBFCAEKAIQIABGG2ogATYCACABDQEMAgsgAiABNgIAIAENAEGcrsAAQZyuwAAoAgBBfiAAKAIcd3E2AgAPCyABIAQ2AhggACgCECICBEAgASACNgIQIAIgATYCGAsgAEEUaigCACIARQ0AIAFBFGogADYCACAAIAE2AhgLC9QCAQN/IwBBIGsiASQAIAAoAgAhAiAAQQI2AgACQAJAAkACQCACDgMCAQIACyABQRxqQQA2AgAgAUG0hsAANgIYIAFCATcCDCABQZCRwAA2AgggAUEIakGYkcAAEFcACyAALQAEIQIgAEEBOgAEIAEgAkEBcSICOgAHIAINASAAQQRqIQICQAJAAkACQEGUrsAAKAIAQf////8HcQRAEGYhAyAAQQVqLQAARQ0CIANBAXMhAwwBCyAAQQVqLQAARQ0CCyABIAM6AAwgASACNgIIQYCHwABBKyABQQhqQayHwABBqJHAABA7AAsgA0UNAQtBlK7AACgCAEH/////B3FFDQAQZg0AIAJBAToAAQsgAkEAOgAACyABQSBqJAAPCyABQRxqQQA2AgAgAUEYakG0hsAANgIAIAFCATcCDCABQfiOwAA2AgggAUEHaiABQQhqEEUAC28BDH9ByLHAACgCACICRQRAQdixwABB/x82AgBBAA8LQcCxwAAhBgNAIAIiASgCCCECIAEoAgQhAyABKAIAIQQgAUEMaigCABogASEGIAVBAWohBSACDQALQdixwAAgBUH/HyAFQf8fSxs2AgAgCAujAgEDfyAAIAFqIQcCQAJAAkACQANAIAAgB0cEQCAALQAAIQUgAEEBaiIBIQAgBUGAAUYNASAFQRh0QRh1QQBOBEBBACEGIAEhAANAIAAgB0YNBSACIARPDQYgAiADaiAALQAAOgAAIAJBBGohAiAAQQFqIQAgBkH/AXEgBkEBaiEGIAVJDQALDAILIAEgB0YNAkEBIAVrIQUgAUEBaiEAIAEtAAAhBkEAIQEDQCACIARPDQYgAiADaiAGOgAAIAJBBGohAiABQQFqIgFB/wFxIAVB/wFxSQ0ACwwBCwsPC0HEg8AAQTtBgITAABCAAQALQeCCwABBwQBBpIPAABCAAQALQayC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GyECAkAgAQRAIANBGGpBATYCACADIAE2AhQgAyAAKAIANgIQDAELIANBADYCEAsgAyACIANBEGoQNSADKAIABEAgA0EIaigCACIARQ0BIAMoAgQgABCIAQALIAMoAgQhASAAQQRqIAI2AgAgACABNgIAIANBIGokAA8LEFYAC7kBAQN/IwBBIGsiAiQAAkAgAUEBaiIDIAFJDQAgAEEEaigCACIBQQF0IgQgAyAEIANLGyIDQQggA0EISxshAwJAIAEEQCACQRhqQQE2AgAgAiABNgIUIAIgACgCADYCEAwBCyACQQA2AhALIAIgAyACQRBqEDUgAigCAARAIAJBCGooAgAiAEUNASACKAIEIAAQiAEACyACKAIEIQEgAEEEaiADNgIAIAAgATYCACACQSBqJAAPCxBWAAurAQEDfwJAIAJBD00EQCAAIQMMAQsgAEEAIABrQQNxIgRqIQUgBARAIAAhAwNAIAMgAToAACADQQFqIgMgBUkNAAsLIAUgAiAEayICQXxxIgRqIQMgBEEBTgRAIAFB/wFxQYGChAhsIQQDQCAFIAQ2AgAgBUEEaiIFIANJDQALCyACQQNxIQILIAIEQCACIANqIQIDQCADIAE6AAAgA0EBaiIDIAJJDQALCyAAC7wBAQJ/IwBBEGsiAiQAIAACf0EBIAAtAAQNABogACgCACEBIAAtAAVFBEAgASgCGEGKlcAAQQcgAUEcaigCACgCDBECAAwBCyABLQAAQQRxRQRAIAEoAhhBhJXAAEEGIAFBHGooAgAoAgwRAgAMAQsgAkEBOgAPIAJBCGogAkEPajYCACACIAEpAhg3AwBBASACEAwNABogASgCGEGDlcAAQQEgASgCHCgCDBECAAsiADoABCACQRBqJAAgAAusAQEDfyMAQTBrIgIkACABQQRqIQMgASgCBEUEQCABKAIAIQEgAkEQaiIEQQA2AgAgAkIBNwMIIAIgAkEIajYCFCACQShqIAFBEGopAgA3AwAgAkEgaiABQQhqKQIANwMAIAIgASkCADcDGCACQRRqQZyGwAAgAkEYahAOGiADQQhqIAQoAgA2AgAgAyACKQMINwIACyAAQaSNwAA2AgQgACADNgIAIAJBMGokA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SxqQRE2AgAgAkICNwIMIAJBrJjAADYCCCACQRE2AiQgAiACQSBqNgIYIAIgAkEEajYCKCACIAI2AiAgAkEIakG8mMAAEFcAC28BAX8jAEEwayICJAAgAiABNgIEIAIgADYCACACQRxqQQI2AgAgAkEsakERNgIAIAJCAjcCDCACQeiXwAA2AgggAkERNgIkIAIgAkEgajYCGCACIAJBBGo2AiggAiACNgIgIAJBCGpB+JfAABBXAAtvAQF/IwBBMGsiAiQAIAIgATYCBCACIAA2AgAgAkEcakECNgIAIAJBLGpBETYCACACQgI3AgwgAkGYl8AANgIIIAJBETYCJCACIAJBIGo2AhggAiACQQRqNgIoIAIgAjYCICACQQhqQciXwAAQVwALbAEBfyMAQTBrIgMkACADIAE2AgQgAyAANgIAIANBHGpBAjYCACADQSxqQRE2AgAgA0ICNwIMIANBzJPAADYCCCADQRE2AiQgAyADQSBqNgIYIAMgAzYCKCADIANBBGo2AiAgA0EIaiACEFcAC1YBAn8jAEEgayICJAAgAUEcaigCACEDIAEoAhggAkEYaiAAQRBqKQIANwMAIAJBEGogAEEIaikCADcDACACIAApAgA3AwggAyACQQhqEA4gAkEgaiQAC2YBAX8jAEEgayICJAAgAkHIicAANgIEIAIgADYCACACQRhqIAFBEGopAgA3AwAgAkEQaiABQQhqKQIANwMAIAIgASkCADcDCCACQbyHwAAgAkEEakG8h8AAIAJBCGpBuI/AABAWAAtjAQF/IwBBIGsiAyQAIANB2IrAADYCBCADIAA2AgAgA0EYaiABQRBqKQIANwMAIANBEGogAUEIaikCADcDACADIAEpAgA3AwggA0HMh8AAIANBBGpBzIfAACADQQhqIAIQFgALWQEBfyMAQSBrIgIkACACIAAoAgA2AgQgAkEYaiABQRBqKQIANwMAIAJBEGogAUEIaikCADcDACACIAEpAgA3AwggAkEEakG8hMAAIAJBCGoQDiACQSBqJAALWQEBfyMAQSBrIgIkACACIAAoAgA2AgQgAkEYaiABQRBqKQIANwMAIAJBEGogAUEIaikCADcDACACIAEpAgA3AwggAkEEakGchsAA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IAIgBFDQAgABAICwsgAQF/AkAgACgCBCIBRQ0AIABBCGooAgBFDQAgARAICwslAQF/IwBBEGsiAyQAIAMgATYCDCADIAA2AgggA0EIaiACEFIACx4AAkAgAUF8TQRAIAAgAUEEIAIQcCIADQELAAsgAAstAEHkscAALQAABEBB6LHAACgCAEUPC0HkscAAQQE6AABB6LHAAEEANgIAQQELIwAgAiACKAIEQX5xNgIEIAAgAUEBcjYCBCAAIAFqIAE2AgALHgAgACABQQNyNgIEIAAgAWoiACAAKAIEQQFyNgIECxQAIABBBGooAgAEQCAAKAIAEAgLCxkBAX8gACgCECIBBH8gAQUgAEEUaigCAAsLEgBBAEEZIABBAXZrIABBH0YbCxYAIAAgAUEBcjYCBCAAIAFqIAE2AgALHAAgASgCGEGMksAAQQ4gAUEcaigCACgCDBECAAscACABKAIYQYSnwABBBSABQRxqKAIAKAIMEQIACxAAIAAgAWpBf2pBACABa3ELDAAgACABIAIgAxALCwsAIAEEQCAAEAgLCw8AIABBAXQiAEEAIABrcgsVACABIAAoAgAiACgCACAAKAIEEAkLFAAgACgCACABIAAoAgQoAgwRAAALCAAgACABEBULDQAgACgCACABEB5BAAsTACAAQbSNwAA2AgQgACABNgIACw0AIAAtAARBAnFBAXYLEAAgASAAKAIAIAAoAgQQCQsKAEEAIABrIABxCwsAIAAtAARBA3FFCwwAIAAgAUEDcjYCBAsNACAAKAIAIAAoAgRqCw4AIAAoAgAaA0AMAAsACwsAIAA1AgAgARAhCwsAIAAgASACEGQACwsAIAAjAGokACMACwwAQaCEwABBGRAEAAspAAJ/IAAoAgAtAABFBEAgAUHflsAAQQUQCQwBCyABQduWwABBBBAJCwsKACAAKAIEQXhxCwoAIAAoAgRBAXELCgAgACgCDEEBcQsKACAAKAIMQQF2CxkAIAAgAUGErsAAKAIAIgBBEiAAGxEBAAALCQAgACABEEIACwkAIAAgARBAAAsKACAAIAEgAhAxCwoAIAAgASACECALBwAgACABagsHACAAIAFrCwcAIABBCGoLBwAgAEF4agsGACABE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EDAgIFAgEBKgIIAe4BAgEEAQABABAQEAACAAHiAZUFAAMBAgUEKAMEAaUCAAQAApkLMQR7ATYPKQECAgoDMQQCAgcBPQMkBQEIPgEMAjQJCgQCAV8DAgEBAgYBoAEDCBUCOQIBAQEBFgEOBwMFwwgCAwEBFwFRAQIGAQECAQECAQLrAQIEBgIBAhsCVQgCAQECagEBAQIGAQFlAwIEAQUACQEC9QEKAgEBBAGQBAICBAEgCigGAgQIAQkGAgMuDQECAAcBBgEBUhYCBwECAQJ6BgMBAQIBBwEBSAIDAQEBAAIABTsHAAE/BFEBAAIALgIXAAEBAwQFCAgCBx4ElAMANwQyCAEOARYFAQ8ABwERAgcBAgEFAAcAAT0EAAdtBwBggPAAQdCtwAALAQEAbwlwcm9kdWNlcnMCCGxhbmd1YWdlAQRSdXN0AAxwcm9jZXNzZWQtYnkDBXJ1c3RjHTEuNjEuMCAoZmU1YjEzZDY4IDIwMjItMDUtMTgpBndhbHJ1cwYwLjE5LjAMd2FzbS1iaW5kZ2VuBjAuMi44MA==",t=async(H={},L)=>{let B;if(L.startsWith("data:")){const b=L.replace(/^data:.*?base64,/,"");let Q;if(typeof Buffer=="function"&&typeof Buffer.from=="function")Q=Buffer.from(b,"base64");else if(typeof atob=="function"){const T=atob(b);Q=new Uint8Array(T.length);for(let M=0;M"u"?(0,st.require)("util").TextDecoder:TextDecoder;let i=new c("utf-8",{ignoreBOM:!0,fatal:!0});i.decode();let h=null;function d(){return(h===null||h.buffer!==I.buffer)&&(h=new Uint8Array(I.buffer)),h}function a(H,L){return i.decode(d().subarray(H,H+L))}let o=0;function s(H,L){const B=L(H.length*1);return d().set(H,B/1),o=H.length,B}let u=null;function g(){return(u===null||u.buffer!==I.buffer)&&(u=new Int32Array(I.buffer)),u}function f(H,L){return d().subarray(H/1,H/1+L)}N0=function(H,L,B,b,Q,T,M){try{const F=ee(-16),$=s(L,Z),N=o,X=s(b,Z),q=o,ie=s(T,Z);S(F,H,$,N,B,X,q,Q,ie,o,M);var _=g()[F/4+0],x=g()[F/4+1],O=f(_,x).slice();return te(_,x*1),O}finally{ee(16)}},G0=function(H,L,B,b,Q,T,M,_,x){try{const N=ee(-16),X=s(L,Z),q=o,ie=s(b,Z),G=o,P=s(T,Z),Y=o,W=s(_,Z);D(N,H,X,q,B,ie,G,Q,P,Y,M,W,o,x);var O=g()[N/4+0],F=g()[N/4+1],$=f(O,F).slice();return te(O,F*1),$}finally{ee(16)}},L0=function(H,L,B){try{const M=ee(-16),_=s(L,Z);R(M,H,_,o,B);var b=g()[M/4+0],Q=g()[M/4+1],T=f(b,Q).slice();return te(b,Q*1),T}finally{ee(16)}},R0=function(H,L,B,b,Q){try{const x=ee(-16),O=s(L,Z),F=o,$=s(b,Z);J(x,H,O,F,B,$,o,Q);var T=g()[x/4+0],M=g()[x/4+1],_=f(T,M).slice();return te(T,M*1),_}finally{ee(16)}};function p(H){l===n.length&&n.push(n.length+1);const L=l;return l=n[L],n[L]=H,L}const v=typeof TextEncoder>"u"?(0,st.require)("util").TextEncoder:TextEncoder;let C=new v("utf-8");const y=typeof C.encodeInto=="function"?function(H,L){return C.encodeInto(H,L)}:function(H,L){const B=C.encode(H);return L.set(B),{read:H.length,written:B.length}};function E(H,L,B){if(B===void 0){const _=C.encode(H),x=L(_.length);return d().subarray(x,x+_.length).set(_),o=_.length,x}let b=H.length,Q=L(b);const T=d();let M=0;for(;M127)break;T[Q+M]=_}if(M!==b){M!==0&&(H=H.slice(M)),Q=B(Q,b,b=M+H.length*3);const _=d().subarray(Q+M,Q+b);M+=y(H,_).written}return o=M,Q}Qd=function(){const H=new Error;return p(H)},kd=function(H,L){const B=r(L).stack,b=E(B,Z,re),Q=o;g()[H/4+1]=Q,g()[H/4+0]=b},_d=function(H,L){try{}finally{te(H,L)}},Td=function(H){m(H)},Dd=function(H,L){throw new Error(a(H,L))};const w=await t({"./webtoon_psd_decoder_bg.js":{__wbg_new_693216e109162396:Qd,__wbg_stack_0ddaca5d1abfb52f:kd,__wbg_error_09919627ac0992f5:_d,__wbindgen_object_drop_ref:Td,__wbindgen_throw:Dd}},e),I=w.memory;w.main_js;const S=w.decode_rgb,D=w.decode_rgba,R=w.decode_grayscale,J=w.decode_grayscale_a,ee=w.__wbindgen_add_to_stack_pointer,Z=w.__wbindgen_malloc,te=w.__wbindgen_free,re=w.__wbindgen_realloc,oe=w.__wbindgen_start;oe()})();async function Fw(e,t,n,r,l,A){const m=e*t;if(!(m>0&&Number.isInteger(m)))throw new Error(`Pixel count must be a positive integer, got ${m}`);let c;if(r&&l)c=await Mw(m,n,r,l,A);else if(!l&&!r)c=await Uc(m,n,A);else throw new Error(`Missing ${l?"green":"blue"} channel in RGB image`);return new Uint8ClampedArray(c.buffer,c.byteOffset,c.byteLength)}function ti(e){switch(e){case sn.RawData:case sn.RleCompressed:return}throw new Q0(`Unsupported compression method: ${e}`)}async function Mw(e,t,n,r,l){return await j0,ti(t.compression),ti(r.compression),ti(t.compression),l&&ti(l.compression),l?G0(e,t.data,t.compression,n.data,n.compression,r.data,r.compression,l.data,l.compression):N0(e,t.data,t.compression,n.data,n.compression,r.data,r.compression)}async function Uc(e,t,n){return await j0,ti(t.compression),n&&ti(n.compression),n?R0(e,t.data,t.compression,n.data,n.compression):L0(e,t.data,t.compression)}function Pw(e){const t=Sw(e),{fileHeader:n}=t,r=uh(n.version),l=FE(t.imageResources),A=Bw(t.layerAndMaskInformation,r),m=_E(t.imageData,n.depth,n.height,n.channelCount,r);return{fileHeader:n,colorModeData:void 0,imageResources:l,layerAndMaskInfo:A,imageData:m}}function ko(e){const t=e.readUnicodeString(0),n=e.readIdString(),r=e.read("u32"),l=new Map;for(;l.size{const m=e.readIdString(),c=Hc(e);return{key:m,value:c}});return{type:t,classObj:{name:n,classId:r},items:A}}case Be.UnitFloats:{const n=Od(e.readString(4)),r=e.read("u32"),l=Array.from(Array(r),()=>e.read("f64"));return{type:t,unitType:n,values:l}}default:throw new iE(`Unexpected descriptor type: ${t}`)}}function Lw(e){const t=e.readString(4);switch(t){case hn.Class:{const n=e.readUnicodeString(0),r=e.readIdString();return{type:t,name:n,classId:r}}case hn.Enumerated:{const n=e.readUnicodeString(0),r=e.readIdString(),l=e.readIdString(),A=e.readIdString();return{type:t,name:n,classId:r,typeId:l,enumValue:A}}case hn.Identifier:{const n=e.readString(4);return{type:t,identifier:n}}case hn.Index:{const n=e.read("u32");return{type:t,index:n}}case hn.Name:{const n=e.readUnicodeString(0);return{type:t,name:n}}case hn.Offset:{const n=e.readUnicodeString(0),r=e.readIdString(),l=e.read("u32");return{type:t,name:n,classId:r,offset:l}}case hn.Property:{const n=e.readUnicodeString(0),r=e.readIdString(),l=e.readIdString();return{type:t,name:n,classId:r,keyId:l}}default:throw new cE(`Invalid reference type: ${t}`)}}function Od(e){if(!Object.values(Gc).includes(e))throw new uE(`Invalid Unit Float type: ${e}`);return e}var je;(function(e){e[e.String=0]="String",e[e.DictBeg=1]="DictBeg",e[e.DictEnd=2]="DictEnd",e[e.ArrBeg=3]="ArrBeg",e[e.ArrEnd=4]="ArrEnd",e[e.Name=5]="Name",e[e.Number=6]="Number",e[e.Boolean=7]="Boolean"})(je||(je={}));const Yc=new Set([0,9,12,32,10,13]),Rw=new Set([102,116]),qt={"(":40,")":41,"<":60,">":62,"[":91,"]":93,"/":47,"\\":92},$0=new Set(Object.values(qt)),U0=[];for(let e=0;e<256;e+=1)U0[e]=Yc.has(e)||$0.has(e);const Nw=new TextDecoder("utf-8");function Gw(e){const t=e.position;let n=e.position;for(const r of e.iter()){if(U0[r])break;n+=1}return Nw.decode(e.take(n-t))}class jw{constructor(t){this.cursor=jn.from(t)}tokens(){const t=[];for(;!this.done();){const n=this.cursor.one();if(Yc.has(n)){for(;!this.done()&&Yc.has(this.cursor.peek());)this.cursor.pass(1);continue}if($0.has(n)){if(n===qt["("]){t.push({type:je.String,value:this.text()});continue}if(n===qt["["]){t.push({type:je.ArrBeg});continue}if(n===qt["]"]){t.push({type:je.ArrEnd});continue}if(n===qt["<"]){this.cursor.pass(1),t.push({type:je.DictBeg});continue}if(n===qt[">"]){this.cursor.pass(1),t.push({type:je.DictEnd});continue}if(n===qt["/"]){t.push({type:je.Name,value:this.string()});continue}continue}this.cursor.unpass(1),Rw.has(n)?t.push({type:je.Boolean,value:this.boolean()}):t.push({type:je.Number,value:this.number()})}return t}done(){return this.cursor.position>=this.cursor.length}text(){const t=this.cursor.peek();if(t===qt[")"])return this.cursor.pass(1),"";const n=t===255||t===254;let r=new TextDecoder("utf-16be");n&&(r=this.textDecoderFromBOM());const l=[],A=this.cursor.clone();for(;A.peek()!==qt[")"];)if(A.pass(1),A.peek()===qt["\\"]){const i=A.position-this.cursor.position;l.push(r.decode(this.cursor.take(i),{stream:!0})),A.pass(2),this.cursor.pass(1),l.push(r.decode(this.cursor.take(1),{stream:!0}))}const m=A.position-this.cursor.position,c=this.cursor.take(m);return l.push(r.decode(c)),this.cursor.pass(1),l.join("")}textDecoderFromBOM(){const t=this.cursor.one(),n=this.cursor.one();if(t===255&&n===254)return new TextDecoder("utf-16le");if(t===254&&n===255)return new TextDecoder("utf-16be");throw new AE(`Unknown BOM value: [${t}, ${n}]`)}string(){return Gw(this.cursor)}number(){const t=this.string(),n=Number(t);if(Number.isNaN(n))throw new fE(`parsing '${t}' as Number failed`);return n}boolean(){const t=this.string();if(t==="true")return!0;if(t==="false")return!1;throw new hE(`'${t}' is neither 'true' nor 'false'`)}}const xl=Symbol(je[je.ArrBeg]),Sl=Symbol(je[je.DictBeg]);class $w{constructor(t){this.tokens=t,this.stack=[]}parse(){this.runParser();const[t]=this.stack;if(typeof t=="object"&&!Array.isArray(t))return t;throw new dE(`EngineData top-level value is not a dict; is ${typeof t}`)}runParser(){for(const t of this.tokens)switch(t.type){case je.Name:case je.Number:case je.Boolean:case je.String:this.stack.push(t.value);continue;case je.DictBeg:this.stack.push(Sl);continue;case je.ArrBeg:this.stack.push(xl);continue;case je.DictEnd:this.stack.push(this.dict());continue;case je.ArrEnd:this.stack.push(this.array().reverse());continue}}dict(){const t={};for(;;){const n=this.stack.pop();if(n===void 0)throw new Ed("Stack empty when parsing dict");if(n===Sl)return t;if(n===xl)throw new El("Got ArrBeg while parsing a dict");const r=this.stack.pop();if(typeof r!="string")throw new El(`Dict key is not Name; is ${typeof r}`);t[r]=n}}array(){const t=[];for(;;){const n=this.stack.pop();if(n===void 0)throw new Ed("Stack empty when parsing array");if(n===Sl)throw new El("Got DictBeg while parsing array");if(n===xl)return t;t.push(n)}}}const Uw=new Set(["DocumentResources","EngineDict","ResourceDict"]);function Hw(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Yw(e){let t=!0;if(typeof e!="object"||!e)return!1;for(const n of Uw)if(Hw(e,n)){const r=e[n];t=t&&typeof r=="object"&&!Array.isArray(r)&&Boolean(r)}else return!1;return t}function zw(e){const t=new $w(new jw(e).tokens()).parse();if(Yw(t))return t;throw new gE(`Object with keys ${JSON.stringify(Object.keys(t))} is not valid EngineData`)}class H0{async composite(t=!0,n=!0){const{red:r,green:l,blue:A,alpha:m}=this.imageData,{width:c,height:i}=this,h=await Fw(c,i,r,l,A,m);if(t===!0)if(n===!0){const d=this.composedOpacity*255;return bd(h,d)}else return bd(h,this.opacity);return h}}class Ww extends H0{constructor(t,n){super(),this.layerFrame=t,this.parent=n,this.type="Layer"}get name(){return this.layerFrame.layerProperties.name}get width(){return this.layerFrame.width}get height(){return this.layerFrame.height}get top(){return this.layerFrame.layerProperties.top}get left(){return this.layerFrame.layerProperties.left}get opacity(){return this.layerFrame.layerProperties.opacity}get composedOpacity(){return this.parent.composedOpacity*(this.opacity/255)}get maskData(){return this.layerFrame.layerProperties.maskData}async userMask(){const t=this.layerFrame.userMask;if(t)return Uc(wd(this.maskData),t)}async realUserMask(){const t=this.maskData.realData,n=this.layerFrame.realUserMask;if(!(!t||!n))return Uc(wd(t),n)}get isHidden(){return this.layerFrame.layerProperties.hidden}get isTransparencyLocked(){return this.layerFrame.layerProperties.transparencyLocked}get additionalProperties(){return this.layerFrame.layerProperties.additionalLayerProperties}get text(){return this.layerFrame.layerProperties.text}get textProperties(){return this.layerFrame.layerProperties.textProperties}get imageData(){const{red:t,green:n,blue:r,alpha:l}=this.layerFrame;return{red:t,green:n,blue:r,alpha:l}}}function Xw(e){return e.type==="Psd"||e.type==="Group"}function Fd(e){if(!Xw(e))throw new Ae(`Node (name = '${e.name}', type: '${e.type}') cannot be a parent node`)}class Vw{constructor(t,n,r,l,A){this.origin=t,this.left=n,this.top=r,this.right=l,this.bottom=A}}function Jw(e){if(e.resource.descriptor){const t=e.resource.descriptor.descriptor.items.get("slices");if(!(t&&t.type===Be.List))throw new oa('Missing key "slices" in slice descriptor');return t.values.reduce((n,r)=>{if(r.type!==Be.Descriptor)throw new oa(`Slice list contains a non-descriptor (type: ${r.type})`);return n.push(Kw(r.descriptor)),n},[])}else throw new oa("No slice descriptor in slice resource block")}function Kw(e){const t=qw(e),n=Ir(e,"bounds",Be.Descriptor).descriptor,r=Ir(n,"Top ",Be.Integer).value,l=Ir(n,"Left",Be.Integer).value,A=Ir(n,"Btom",Be.Integer).value,m=Ir(n,"Rght",Be.Integer).value;return new Vw(t,l,r,m,A)}function qw(e){const t=Ir(e,"origin",Be.Enumerated);if(t.enumType!=="ESliceOrigin")throw new oa(`Unexpected enum type for slice origin: got "${t.enumType}"`);switch(t.enumValue){case"layerGenerated":return ci.LayerGenerated;case"userGenerated":return ci.UserGenerated;case"autoGenerated":return ci.AutoGenerated;default:throw new oa(`Unexpected enum value for slice origin: got "${t.enumValue}"`)}}class hh extends H0{constructor(t){super(),this.parsingResult=t,this.name="ROOT",this.type="Psd",this.opacity=255,this.composedOpacity=1,this.children=[],this.layers=[],this.guides=[],this.slices=[],this.icc_profile=void 0,this.globalLightAngle=void 0,this.globalLightAltitude=void 0,this.resolutionInfo=void 0,this.additionalLayerProperties=[],this.buildTreeStructure(),this.additionalLayerProperties=t.layerAndMaskInfo.globalAdditionalLayerInformation;for(const n of t.imageResources.resources)if(n.resource!==null)switch(n.id){case ht.GridAndGuides:this.guides=n.resource.guides;break;case ht.Slices:this.slices=Jw(n);break;case ht.ICCProfile:this.icc_profile=n.resource;break;case ht.GlobalLightAltitude:this.globalLightAltitude=n.resource;break;case ht.GlobalLightAngle:this.globalLightAngle=n.resource;break;case ht.ResolutionInfo:this.resolutionInfo=n.resource;break}}static parse(t){const n=Pw(t);return new hh(n)}get width(){return this.parsingResult.fileHeader.width}get height(){return this.parsingResult.fileHeader.height}get channelCount(){return this.parsingResult.fileHeader.channelCount}get depth(){return this.parsingResult.fileHeader.depth}get colorMode(){return this.parsingResult.fileHeader.colorMode}get imageData(){const{compression:t,red:n,green:r,blue:l,alpha:A}=this.parsingResult.imageData;return{red:{compression:t,data:n},green:r?{compression:t,data:r}:void 0,blue:l?{compression:t,data:l}:void 0,alpha:A?{compression:t,data:A}:void 0}}buildTreeStructure(){const{groups:t,layers:n,orders:r}=this.parsingResult.layerAndMaskInfo,l=[this];let A=0,m=0;r.forEach(c=>{const i=l[l.length-1];switch(c){case"G":{const h=t[A];Fd(i);const d=new F1(h,i);l.push(d),i.children.push(d),A+=1;break}case"L":{const h=n[m];Fd(i);const d=new Ww(h,i);this.layers.push(d),i.children.push(d),m+=1;break}case"D":l.pop()}}),l.length=0,this.children.forEach(c=>{var i,h;return(h=(i=c).freeze)===null||h===void 0?void 0:h.call(i)}),Object.freeze(this.children)}}function Zw(){const e=K.exports.useContext(tf),[t,n]=K.exports.useState({undo:!1,redo:!1}),r=async()=>{if(!ce.current)return;const o=await ce.current.toImage(),s=document.createElement("a");s.href=o,s.download=`image-${Date.now()}.png`,s.click()},l=async()=>{ce.current&&ce.current.toJson(!0)},A=()=>{location.replace(location.origin)},m=async o=>{const s=o.target.files&&o.target.files[0];if(s!==null){if(o.target.value="",!s.name.endsWith(".psd"))return en.show("请选择正确的文件类型");try{const u=await s.arrayBuffer(),g=hh.parse(u);i(g)}catch{en.show("psd 解析失败")}}},c=o=>{let s=!1;return o.isHidden&&(s=!0),(o.width>3600||o.height>3600)&&(s=!0),s},i=async o=>{var p,v;if(!ce.current)return;const s=o.children,u=C=>{const y=[],E=[];for(let w=C.children.length-1;w>=0;--w){const I=C.children[w];I.type==="Layer"?!c(I)&&y.push(I):I.type==="Group"&&E.push(I)}return E.forEach(w=>{y.push(...u(w))}),y},g=[];for(let C=s.length-1;C>=0;--C){const y=s[C];(v=(p=y==null?void 0:y.layerFrame)==null?void 0:p.layerProperties)!=null&&v.hidden||(y.type==="Group"?g.push(u(y)):y.type==="Layer"&&!c(y)&&g.push([y]))}const f=[];for(let C=0;C{ce.current.add(C)})},h=async o=>{const s=ce.current;if(!s)return;const u=o.target.files&&o.target.files[0];if(u!==null){if(o.target.value="",!u.name.endsWith(".json"))return en.show("请选择正确的文件类型");try{const g=await u.text(),f=JSON.parse(g);s.loadFromJson(f)}catch{en.show("导入失败")}}},d=()=>{!ce.current||!t.undo||(en.show("使用快捷键 Ctrl + Z 更方便哦~"),ce.current.undo())},a=()=>{!ce.current||!t.redo||(en.show("使用快捷键 Ctrl + Y 更方便哦~"),ce.current.redo())};return K.exports.useEffect(()=>(at.on("stack-status",n),()=>{at.off("stack-status",n)}),[]),pe("div",{className:O1.header,children:[pe("div",{className:"header-left",children:[U("div",{className:"title",children:e.name}),U("div",{className:"divider"}),U(Fc,{className:"icon-wrapper",text:"撤销",style:t.undo?void 0:{color:"#999"},position:"bottom",onClick:d,children:U(Dt,{type:"icon-undo"})}),U(Fc,{className:"icon-wrapper",style:t.redo?void 0:{color:"#999"},text:"重做",position:"bottom",onClick:a,children:U(Dt,{type:"icon-redo"})}),e.id!==""&&U(nn,{style:{marginRight:8},onClick:A,children:"新建画布"})]}),pe("div",{className:"header-right",children:[pe(nn,{style:{marginRight:8},children:["从设计图导入",U("input",{className:"hide-input",type:"file",accept:".psd",onChange:m})]}),pe(nn,{style:{marginRight:8},children:["导入",U("input",{className:"hide-input",type:"file",accept:".json",onChange:h})]}),U(nn,{style:{marginRight:8},onClick:r,children:"导出图片"}),U(nn,{type:"primary",onClick:l,children:"保存"})]})]})}const e2="_sidebar_1c5do_1",t2="_tabs_1c5do_6",n2="_main_1c5do_51",bl={sidebar:e2,tabs:t2,main:n2},r2="_template_190z5_1",i2={template:r2};function a2(){return U("div",{className:i2.template,children:U(_o,{type:"template"})})}const s2="_attr_1jnav_1",o2={attr:s2},l2={"double-input":"_double-input_1nolq_1"};function Y0({item:e}){const{name:t,value:n,label:r,handler:l}=e,[A,m]=K.exports.useState(n.map(String)),c=(i,h)=>{let{value:d}=i.target;if(/[^-\d]/.test(d))return;Number(d)>=1e4&&(d="10000");const a=A.slice();a[h]=d,m(a),d!==""&&!isNaN(Number(d))&&l(...a.map(Number))};return K.exports.useEffect(()=>{m(n.map(String))},[n]),pe("div",{className:l2["double-input"],children:[U("div",{className:"name",children:t}),pe("div",{className:"wrapper",children:[U("input",{className:"controlled-input",value:A[0],onChange:i=>c(i,0)}),U("input",{className:"controlled-input",value:A[1],onChange:i=>c(i,1)}),U("div",{className:"label-first",children:r[0]}),U("div",{className:"label-second",children:r[1]})]})]})}const c2={"upload-image":"_upload-image_ozos7_1"};function u2({item:e}){const{name:t,handler:n}=e,r=l=>{const A=l.target.files&&l.target.files[0];if(A===null)return;l.target.value="";const m=new FileReader;m.readAsDataURL(A),m.onload=c=>{const i=c.target.result;n(i)}};return U("div",{className:c2["upload-image"],children:pe(nn,{className:"button",children:[t,U("input",{className:"hide-input",type:"file",accept:"image/*",onChange:r})]})})}const h2="_range_ibvr5_1",f2={range:h2};function zc({item:e}){const{name:t,value:n,min:r=0,max:l=100,handler:A}=e,[m,c]=K.exports.useState(n),i=K.exports.useRef(null),h=s=>{const u=i.current;if(!u)return;const{value:g}=s.target;if(g===""){c(r),A(r),u.style.setProperty("--rail-width","0%");return}if(/[^\d]/.test(g))return;let f=Number(g);f>l?f=l:f{const u=i.current;if(!u)return;const{clientWidth:g,offsetLeft:f}=u;let p=(s.clientX-f)/g;p>1?p=1:p<0&&(p=0),u.style.setProperty("--rail-width",`${p*100}%`);const v=p*l>>0;c(v),A(v)},[]),a=K.exports.useCallback(()=>{window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",a)},[]),o=s=>{if(s.button!==0)return;const u=i.current;if(!u)return;window.addEventListener("mousemove",d),window.addEventListener("mouseup",a);const{clientWidth:g,offsetLeft:f}=u;let p=(s.clientX-f)/g;p>1?p=1:p<0&&(p=0),u.style.setProperty("--rail-width",`${p*100}%`);const v=p*l>>0;c(v),A(v)};return K.exports.useEffect(()=>{const s=i.current;if(!s)return;c(n);const u=(n-r)/l;s.style.setProperty("--rail-width",`${u*100}%`)},[n]),pe("div",{className:f2.range,children:[pe("div",{className:"header-wrapper",children:[U("div",{children:t}),U("input",{className:"range-input",value:m,onChange:h})]}),U("div",{className:"progress",onMouseDown:o,ref:i,children:U("div",{className:"rail",children:U("div",{className:"handle"})})})]})}const d2="_textarea_1390d_1",A2={textarea:d2};function g2({item:e}){const{name:t,value:n,handler:r}=e,[l,A]=K.exports.useState(n),m=c=>{A(c.target.value),r(c.target.value)};return K.exports.useEffect(()=>{A(n)},[n]),pe("div",{className:A2.textarea,children:[U("div",{className:"name",children:t}),U("textarea",{className:"input-area",onChange:m,value:l})]})}const p2="_color_1llze_1",v2={color:p2};var Qt={},Pa={},m2=typeof Ya=="object"&&Ya&&Ya.Object===Object&&Ya,z0=m2,C2=z0,y2=typeof self=="object"&&self&&self.Object===Object&&self,E2=C2||y2||Function("return this")(),ln=E2,w2=ln,I2=w2.Symbol,La=I2,Md=La,W0=Object.prototype,B2=W0.hasOwnProperty,x2=W0.toString,Gi=Md?Md.toStringTag:void 0;function S2(e){var t=B2.call(e,Gi),n=e[Gi];try{e[Gi]=void 0;var r=!0}catch{}var l=x2.call(e);return r&&(t?e[Gi]=n:delete e[Gi]),l}var b2=S2,_2=Object.prototype,Q2=_2.toString;function k2(e){return Q2.call(e)}var T2=k2,Pd=La,D2=b2,O2=T2,F2="[object Null]",M2="[object Undefined]",Ld=Pd?Pd.toStringTag:void 0;function P2(e){return e==null?e===void 0?M2:F2:Ld&&Ld in Object(e)?D2(e):O2(e)}var Ar=P2,L2=Array.isArray,Xt=L2;function R2(e){return e!=null&&typeof e=="object"}var En=R2,N2=Ar,G2=Xt,j2=En,$2="[object String]";function U2(e){return typeof e=="string"||!G2(e)&&j2(e)&&N2(e)==$2}var H2=U2;function Y2(e){return function(t,n,r){for(var l=-1,A=Object(t),m=r(t),c=m.length;c--;){var i=m[e?c:++l];if(n(A[i],i,A)===!1)break}return t}}var z2=Y2,W2=z2,X2=W2(),V2=X2;function J2(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&e-1&&e%1==0&&e<=fI}var fh=dI,AI=Ar,gI=fh,pI=En,vI="[object Arguments]",mI="[object Array]",CI="[object Boolean]",yI="[object Date]",EI="[object Error]",wI="[object Function]",II="[object Map]",BI="[object Number]",xI="[object Object]",SI="[object RegExp]",bI="[object Set]",_I="[object String]",QI="[object WeakMap]",kI="[object ArrayBuffer]",TI="[object DataView]",DI="[object Float32Array]",OI="[object Float64Array]",FI="[object Int8Array]",MI="[object Int16Array]",PI="[object Int32Array]",LI="[object Uint8Array]",RI="[object Uint8ClampedArray]",NI="[object Uint16Array]",GI="[object Uint32Array]",ke={};ke[DI]=ke[OI]=ke[FI]=ke[MI]=ke[PI]=ke[LI]=ke[RI]=ke[NI]=ke[GI]=!0;ke[vI]=ke[mI]=ke[kI]=ke[CI]=ke[TI]=ke[yI]=ke[EI]=ke[wI]=ke[II]=ke[BI]=ke[xI]=ke[SI]=ke[bI]=ke[_I]=ke[QI]=!1;function jI(e){return pI(e)&&gI(e.length)&&!!ke[AI(e)]}var $I=jI;function UI(e){return function(t){return e(t)}}var dh=UI,ba={exports:{}};(function(e,t){var n=z0,r=t&&!t.nodeType&&t,l=r&&!0&&e&&!e.nodeType&&e,A=l&&l.exports===r,m=A&&n.process,c=function(){try{var i=l&&l.require&&l.require("util").types;return i||m&&m.binding&&m.binding("util")}catch{}}();e.exports=c})(ba,ba.exports);var HI=$I,YI=dh,Nd=ba.exports,Gd=Nd&&Nd.isTypedArray,zI=Gd?YI(Gd):HI,K0=zI,WI=K2,XI=V0,VI=Xt,JI=Sa.exports,KI=J0,qI=K0,ZI=Object.prototype,eB=ZI.hasOwnProperty;function tB(e,t){var n=VI(e),r=!n&&XI(e),l=!n&&!r&&JI(e),A=!n&&!r&&!l&&qI(e),m=n||r||l||A,c=m?WI(e.length,String):[],i=c.length;for(var h in e)(t||eB.call(e,h))&&!(m&&(h=="length"||l&&(h=="offset"||h=="parent")||A&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||KI(h,i)))&&c.push(h);return c}var q0=tB,nB=Object.prototype;function rB(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||nB;return e===n}var Ah=rB;function iB(e,t){return function(n){return e(t(n))}}var Z0=iB,aB=Z0,sB=aB(Object.keys,Object),oB=sB,lB=Ah,cB=oB,uB=Object.prototype,hB=uB.hasOwnProperty;function fB(e){if(!lB(e))return cB(e);var t=[];for(var n in Object(e))hB.call(e,n)&&n!="constructor"&&t.push(n);return t}var dB=fB;function AB(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ei=AB,gB=Ar,pB=Ei,vB="[object AsyncFunction]",mB="[object Function]",CB="[object GeneratorFunction]",yB="[object Proxy]";function EB(e){if(!pB(e))return!1;var t=gB(e);return t==mB||t==CB||t==vB||t==yB}var ev=EB,wB=ev,IB=fh;function BB(e){return e!=null&&IB(e.length)&&!wB(e)}var To=BB,xB=q0,SB=dB,bB=To;function _B(e){return bB(e)?xB(e):SB(e)}var Ra=_B,QB=V2,kB=Ra;function TB(e,t){return e&&QB(e,t,kB)}var tv=TB;function DB(e){return e}var nv=DB,OB=nv;function FB(e){return typeof e=="function"?e:OB}var MB=FB,PB=tv,LB=MB;function RB(e,t){return e&&PB(e,LB(t))}var gh=RB,NB=Z0,GB=NB(Object.getPrototypeOf,Object),ph=GB,jB=Ar,$B=ph,UB=En,HB="[object Object]",YB=Function.prototype,zB=Object.prototype,rv=YB.toString,WB=zB.hasOwnProperty,XB=rv.call(Object);function VB(e){if(!UB(e)||jB(e)!=HB)return!1;var t=$B(e);if(t===null)return!0;var n=WB.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&rv.call(n)==XB}var JB=VB;function KB(e,t){for(var n=-1,r=e==null?0:e.length,l=Array(r);++n-1}var dx=fx,Ax=Do;function gx(e,t){var n=this.__data__,r=Ax(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var px=gx,vx=ZB,mx=ox,Cx=ux,yx=dx,Ex=px;function wi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++tc))return!1;var h=A.get(e),d=A.get(t);if(h&&d)return h==t&&d==e;var a=-1,o=!0,s=n&Ob?new Qb:void 0;for(A.set(e,t),A.set(t,e);++a0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,Ik.default)(t,function(r){Array.isArray(r)?e(r).map(function(l){return n.push(l)}):(0,Ek.default)(r)?(0,Ck.default)(r,function(l,A){l===!0&&n.push(A),n.push(A+"-"+l)}):(0,vk.default)(r)&&n.push(r)}),n};Pa.default=Bk;var Na={};function xk(e,t){for(var n=-1,r=e==null?0:e.length;++n1&&arguments[1]!==void 0?arguments[1]:[],r=t.default&&(0,HD.default)(t.default)||{};return n.map(function(l){var A=t[l];return A&&(0,$D.default)(A,function(m,c){r[c]||(r[c]={}),r[c]=YD({},r[c],A[c])}),l}),r};Na.default=zD;var Ga={};Object.defineProperty(Ga,"__esModule",{value:!0});Ga.autoprefix=void 0;var WD=gh,yA=VD(WD),XD=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){n4(l,r);function l(){var A,m,c,i;t4(this,l);for(var h=arguments.length,d=Array(h),a=0;a1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){l4(l,r);function l(){var A,m,c,i;o4(this,l);for(var h=arguments.length,d=Array(h),a=0;a1&&arguments[1]!==void 0?arguments[1]:!0;r[m]=c};return t===0&&l("first-child"),t===n-1&&l("last-child"),(t===0||t%2===0)&&l("even"),Math.abs(t%2)===1&&l("odd"),l("nth-child",t),r};bh.default=u4;Object.defineProperty(Qt,"__esModule",{value:!0});Qt.ReactCSS=Qt.loop=Qt.handleActive=_h=Qt.handleHover=Qt.hover=void 0;var h4=Pa,f4=bi(h4),d4=Na,A4=bi(d4),g4=Ga,p4=bi(g4),v4=ja,_v=bi(v4),m4=$a,C4=bi(m4),y4=bh,E4=bi(y4);function bi(e){return e&&e.__esModule?e:{default:e}}Qt.hover=_v.default;var _h=Qt.handleHover=_v.default;Qt.handleActive=C4.default;Qt.loop=E4.default;var w4=Qt.ReactCSS=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),l=1;lc?o=1:o=Math.round(a*100/c)/100,n.a!==o)return{h:n.h,s:n.s,l:n.l,a:o,source:"rgb"}}else{var s=void 0;if(d<0?s=0:d>m?s=1:s=Math.round(d*100/m)/100,l!==s)return{h:n.h,s:n.s,l:n.l,a:s,source:"rgb"}}return null},Ol={},B4=function(t,n,r,l){if(typeof document>"u"&&!l)return null;var A=l?new l:document.createElement("canvas");A.width=r*2,A.height=r*2;var m=A.getContext("2d");return m?(m.fillStyle=t,m.fillRect(0,0,A.width,A.height),m.fillStyle=n,m.fillRect(0,0,r,r),m.translate(r,r),m.fillRect(0,0,r,r),A.toDataURL()):null},x4=function(t,n,r,l){var A=t+"-"+n+"-"+r+(l?"-server":"");if(Ol[A])return Ol[A];var m=B4(t,n,r,l);return Ol[A]=m,m},IA=Object.assign||function(e){for(var t=1;t-1},j4=function(t){return Number(String(t).replace(/%/g,""))},$4=1,ye=function(e){P4(t,e);function t(n){F4(this,t);var r=M4(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(l){r.setUpdatedValue(l.target.value,l)},r.handleKeyDown=function(l){var d=j4(l.target.value);if(!isNaN(d)&&G4(l.keyCode)){var m=r.getArrowOffset(),c=l.keyCode===Qv?d+m:d-m;r.setUpdatedValue(c,l)}},r.handleDrag=function(l){if(r.props.dragLabel){var d=Math.round(r.props.value+l.movementX);d>=0&&d<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(d),l)}},r.handleMouseDown=function(l){r.props.dragLabel&&(l.preventDefault(),r.handleDrag(l),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},r.inputId="rc-editable-input-"+$4++,r}return D4(t,[{key:"componentDidUpdate",value:function(r,l){this.props.value!==this.state.value&&(r.value!==this.props.value||l.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return O4({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||L4}},{key:"setUpdatedValue",value:function(r,l){var d=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(d,l),this.setState({value:r})}},{key:"render",value:function(){var r=this,l=Ae({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return k.createElement("div",{style:l.wrap},k.createElement("input",{id:this.inputId,style:l.input,ref:function(m){return r.input=m},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?k.createElement("label",{htmlFor:this.inputId,style:l.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(K.exports.PureComponent||K.exports.Component),U4=function(t,n,r,l){var d=l.clientWidth,m=l.clientHeight,c=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,i=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,h=c-(l.getBoundingClientRect().left+window.pageXOffset),A=i-(l.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var a=void 0;if(A<0)a=359;else if(A>m)a=0;else{var o=-(A*100/m)+100;a=360*o/100}if(r.h!==a)return{h:a,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var s=void 0;if(h<0)s=0;else if(h>d)s=359;else{var u=h*100/d;s=360*u/100}if(r.h!==s)return{h:s,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},H4=function(){function e(t,n){for(var r=0;r-1},N4=function(t){return Number(String(t).replace(/%/g,""))},G4=1,ye=function(e){F4(t,e);function t(n){D4(this,t);var r=O4(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(l){r.setUpdatedValue(l.target.value,l)},r.handleKeyDown=function(l){var A=N4(l.target.value);if(!isNaN(A)&&R4(l.keyCode)){var m=r.getArrowOffset(),c=l.keyCode===Qv?A+m:A-m;r.setUpdatedValue(c,l)}},r.handleDrag=function(l){if(r.props.dragLabel){var A=Math.round(r.props.value+l.movementX);A>=0&&A<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(A),l)}},r.handleMouseDown=function(l){r.props.dragLabel&&(l.preventDefault(),r.handleDrag(l),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},r.inputId="rc-editable-input-"+G4++,r}return k4(t,[{key:"componentDidUpdate",value:function(r,l){this.props.value!==this.state.value&&(r.value!==this.props.value||l.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return T4({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||M4}},{key:"setUpdatedValue",value:function(r,l){var A=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(A,l),this.setState({value:r})}},{key:"render",value:function(){var r=this,l=de({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return k.createElement("div",{style:l.wrap},k.createElement("input",{id:this.inputId,style:l.input,ref:function(m){return r.input=m},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?k.createElement("label",{htmlFor:this.inputId,style:l.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(K.exports.PureComponent||K.exports.Component),j4=function(t,n,r,l){var A=l.clientWidth,m=l.clientHeight,c=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,i=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,h=c-(l.getBoundingClientRect().left+window.pageXOffset),d=i-(l.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var a=void 0;if(d<0)a=359;else if(d>m)a=0;else{var o=-(d*100/m)+100;a=360*o/100}if(r.h!==a)return{h:a,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var s=void 0;if(h<0)s=0;else if(h>A)s=359;else{var u=h*100/A;s=360*u/100}if(r.h!==s)return{h:s,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},$4=function(){function e(t,n){for(var r=0;r-1}function r5(e,t){var n=this.__data__,r=Go(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function wn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=IO}function ki(e){return e!=null&&Oh(e.length)&&!kh(e)}function BO(e){return Un(e)&&ki(e)}function xO(){return!1}var Nv=typeof Et=="object"&&Et&&!Et.nodeType&&Et,Od=Nv&&typeof st=="object"&&st&&!st.nodeType&&st,SO=Od&&Od.exports===Nv,Fd=SO?Vt.Buffer:void 0,bO=Fd?Fd.isBuffer:void 0,_O=bO||xO;const so=_O;var QO="[object Object]",kO=Function.prototype,TO=Object.prototype,Gv=kO.toString,DO=TO.hasOwnProperty,OO=Gv.call(Object);function FO(e){if(!Un(e)||pr(e)!=QO)return!1;var t=Lv(e);if(t===null)return!0;var n=DO.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Gv.call(n)==OO}var MO="[object Arguments]",PO="[object Array]",LO="[object Boolean]",RO="[object Date]",NO="[object Error]",GO="[object Function]",jO="[object Map]",$O="[object Number]",UO="[object Object]",HO="[object RegExp]",YO="[object Set]",zO="[object String]",WO="[object WeakMap]",XO="[object ArrayBuffer]",VO="[object DataView]",JO="[object Float32Array]",KO="[object Float64Array]",qO="[object Int8Array]",ZO="[object Int16Array]",eF="[object Int32Array]",tF="[object Uint8Array]",nF="[object Uint8ClampedArray]",rF="[object Uint16Array]",iF="[object Uint32Array]",Te={};Te[JO]=Te[KO]=Te[qO]=Te[ZO]=Te[eF]=Te[tF]=Te[nF]=Te[rF]=Te[iF]=!0;Te[MO]=Te[PO]=Te[XO]=Te[LO]=Te[VO]=Te[RO]=Te[NO]=Te[GO]=Te[jO]=Te[$O]=Te[UO]=Te[HO]=Te[YO]=Te[zO]=Te[WO]=!1;function aF(e){return Un(e)&&Oh(e.length)&&!!Te[pr(e)]}function sF(e){return function(t){return e(t)}}var jv=typeof Et=="object"&&Et&&!Et.nodeType&&Et,la=jv&&typeof st=="object"&&st&&!st.nodeType&&st,oF=la&&la.exports===jv,Pl=oF&&Dv.process,lF=function(){try{var e=la&&la.require&&la.require("util").types;return e||Pl&&Pl.binding&&Pl.binding("util")}catch{}}();const Md=lF;var Pd=Md&&Md.isTypedArray,cF=Pd?sF(Pd):aF;const Fh=cF;function eu(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var uF=Object.prototype,hF=uF.hasOwnProperty;function fF(e,t,n){var r=e[t];(!(hF.call(e,t)&&$a(r,n))||n===void 0&&!(t in e))&&Th(e,t,n)}function AF(e,t,n,r){var l=!n;n||(n={});for(var d=-1,m=t.length;++d-1&&e%1==0&&e0){if(++t>=kF)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var FF=OF(QF);const MF=FF;function PF(e,t){return MF(SF(e,t,$o),e+"")}function LF(e,t,n){if(!Mt(n))return!1;var r=typeof t;return(r=="number"?ki(n)&&Mh(t,n.length):r=="string"&&t in n)?$a(n[t],e):!1}function RF(e){return PF(function(t,n){var r=-1,l=n.length,d=l>1?n[l-1]:void 0,m=l>2?n[2]:void 0;for(d=e.length>3&&typeof d=="function"?(l--,d):void 0,m&&LF(n[0],n[1],m)&&(d=l<3?void 0:d,l=1),t=Object(t);++r=t||I<0||a&&S>=d}function p(){var w=Ll();if(f(w))return v(w);c=setTimeout(p,g(w))}function v(w){return c=void 0,o&&r?s(w):(r=l=void 0,m)}function C(){c!==void 0&&clearTimeout(c),h=0,r=i=l=c=void 0}function y(){return c===void 0?m:v(Ll())}function E(){var w=Ll(),I=f(w);if(r=arguments,l=this,i=w,I){if(c===void 0)return u(i);if(a)return clearTimeout(c),c=setTimeout(p,t),s(i)}return c===void 0&&(c=setTimeout(p,t)),m}return E.cancel=C,E.flush=y,E}var ZF="Expected a function";function eM(e,t,n){var r=!0,l=!0;if(typeof e!="function")throw new TypeError(ZF);return Mt(n)&&(r="leading"in n?!!n.leading:r,l="trailing"in n?!!n.trailing:l),Yv(e,t,{leading:r,maxWait:t,trailing:l})}var tM=function(t,n,r){var l=r.getBoundingClientRect(),d=l.width,m=l.height,c=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,i=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,h=c-(r.getBoundingClientRect().left+window.pageXOffset),A=i-(r.getBoundingClientRect().top+window.pageYOffset);h<0?h=0:h>d&&(h=d),A<0?A=0:A>m&&(A=m);var a=h/d,o=1-A/m;return{h:n.h,s:a,v:o,a:n.a,source:"hsv"}},nM=function(){function e(t,n){for(var r=0;r-1}function t5(e,t){var n=this.__data__,r=Go(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function wn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=EO}function ki(e){return e!=null&&Oh(e.length)&&!kh(e)}function wO(e){return Un(e)&&ki(e)}function IO(){return!1}var Nv=typeof Et=="object"&&Et&&!Et.nodeType&&Et,OA=Nv&&typeof st=="object"&&st&&!st.nodeType&&st,BO=OA&&OA.exports===Nv,FA=BO?Vt.Buffer:void 0,xO=FA?FA.isBuffer:void 0,SO=xO||IO;const oo=SO;var bO="[object Object]",_O=Function.prototype,QO=Object.prototype,Gv=_O.toString,kO=QO.hasOwnProperty,TO=Gv.call(Object);function DO(e){if(!Un(e)||pr(e)!=bO)return!1;var t=Lv(e);if(t===null)return!0;var n=kO.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Gv.call(n)==TO}var OO="[object Arguments]",FO="[object Array]",MO="[object Boolean]",PO="[object Date]",LO="[object Error]",RO="[object Function]",NO="[object Map]",GO="[object Number]",jO="[object Object]",$O="[object RegExp]",UO="[object Set]",HO="[object String]",YO="[object WeakMap]",zO="[object ArrayBuffer]",WO="[object DataView]",XO="[object Float32Array]",VO="[object Float64Array]",JO="[object Int8Array]",KO="[object Int16Array]",qO="[object Int32Array]",ZO="[object Uint8Array]",eF="[object Uint8ClampedArray]",tF="[object Uint16Array]",nF="[object Uint32Array]",Te={};Te[XO]=Te[VO]=Te[JO]=Te[KO]=Te[qO]=Te[ZO]=Te[eF]=Te[tF]=Te[nF]=!0;Te[OO]=Te[FO]=Te[zO]=Te[MO]=Te[WO]=Te[PO]=Te[LO]=Te[RO]=Te[NO]=Te[GO]=Te[jO]=Te[$O]=Te[UO]=Te[HO]=Te[YO]=!1;function rF(e){return Un(e)&&Oh(e.length)&&!!Te[pr(e)]}function iF(e){return function(t){return e(t)}}var jv=typeof Et=="object"&&Et&&!Et.nodeType&&Et,la=jv&&typeof st=="object"&&st&&!st.nodeType&&st,aF=la&&la.exports===jv,Ml=aF&&Dv.process,sF=function(){try{var e=la&&la.require&&la.require("util").types;return e||Ml&&Ml.binding&&Ml.binding("util")}catch{}}();const MA=sF;var PA=MA&&MA.isTypedArray,oF=PA?iF(PA):rF;const Fh=oF;function eu(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var lF=Object.prototype,cF=lF.hasOwnProperty;function uF(e,t,n){var r=e[t];(!(cF.call(e,t)&&Ua(r,n))||n===void 0&&!(t in e))&&Th(e,t,n)}function hF(e,t,n,r){var l=!n;n||(n={});for(var A=-1,m=t.length;++A-1&&e%1==0&&e0){if(++t>=_F)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var DF=TF(bF);const OF=DF;function FF(e,t){return OF(BF(e,t,$o),e+"")}function MF(e,t,n){if(!Mt(n))return!1;var r=typeof t;return(r=="number"?ki(n)&&Mh(t,n.length):r=="string"&&t in n)?Ua(n[t],e):!1}function PF(e){return FF(function(t,n){var r=-1,l=n.length,A=l>1?n[l-1]:void 0,m=l>2?n[2]:void 0;for(A=e.length>3&&typeof A=="function"?(l--,A):void 0,m&&MF(n[0],n[1],m)&&(A=l<3?void 0:A,l=1),t=Object(t);++r=t||I<0||a&&S>=A}function p(){var w=Pl();if(f(w))return v(w);c=setTimeout(p,g(w))}function v(w){return c=void 0,o&&r?s(w):(r=l=void 0,m)}function C(){c!==void 0&&clearTimeout(c),h=0,r=i=l=c=void 0}function y(){return c===void 0?m:v(Pl())}function E(){var w=Pl(),I=f(w);if(r=arguments,l=this,i=w,I){if(c===void 0)return u(i);if(a)return clearTimeout(c),c=setTimeout(p,t),s(i)}return c===void 0&&(c=setTimeout(p,t)),m}return E.cancel=C,E.flush=y,E}var KF="Expected a function";function qF(e,t,n){var r=!0,l=!0;if(typeof e!="function")throw new TypeError(KF);return Mt(n)&&(r="leading"in n?!!n.leading:r,l="trailing"in n?!!n.trailing:l),Yv(e,t,{leading:r,maxWait:t,trailing:l})}var ZF=function(t,n,r){var l=r.getBoundingClientRect(),A=l.width,m=l.height,c=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,i=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,h=c-(r.getBoundingClientRect().left+window.pageXOffset),d=i-(r.getBoundingClientRect().top+window.pageYOffset);h<0?h=0:h>A&&(h=A),d<0?d=0:d>m&&(d=m);var a=h/A,o=1-d/m;return{h:n.h,s:a,v:o,a:n.a,source:"hsv"}},eM=function(){function e(t,n){for(var r=0;r=0,d=!n&&l&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return d?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return ue(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(bM,arguments)},brighten:function(){return this._applyModification(_M,arguments)},darken:function(){return this._applyModification(QM,arguments)},desaturate:function(){return this._applyModification(BM,arguments)},saturate:function(){return this._applyModification(xM,arguments)},greyscale:function(){return this._applyModification(SM,arguments)},spin:function(){return this._applyModification(kM,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(OM,arguments)},complement:function(){return this._applyCombination(TM,arguments)},monochromatic:function(){return this._applyCombination(FM,arguments)},splitcomplement:function(){return this._applyCombination(DM,arguments)},triad:function(){return this._applyCombination(Hd,[3])},tetrad:function(){return this._applyCombination(Hd,[4])}};ue.fromRatio=function(e,t){if(oo(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Xi(e[r]));e=n}return ue(e,t)};function CM(e){var t={r:0,g:0,b:0},n=1,r=null,l=null,d=null,m=!1,c=!1;return typeof e=="string"&&(e=NM(e)),oo(e)=="object"&&(cn(e.r)&&cn(e.g)&&cn(e.b)?(t=yM(e.r,e.g,e.b),m=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):cn(e.h)&&cn(e.s)&&cn(e.v)?(r=Xi(e.s),l=Xi(e.v),t=wM(e.h,r,l),m=!0,c="hsv"):cn(e.h)&&cn(e.s)&&cn(e.l)&&(r=Xi(e.s),d=Xi(e.l),t=EM(e.h,r,d),m=!0,c="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=Wv(n),{ok:m,format:e.format||c,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function yM(e,t,n){return{r:Fe(e,255)*255,g:Fe(t,255)*255,b:Fe(n,255)*255}}function Gd(e,t,n){e=Fe(e,255),t=Fe(t,255),n=Fe(n,255);var r=Math.max(e,t,n),l=Math.min(e,t,n),d,m,c=(r+l)/2;if(r==l)d=m=0;else{var i=r-l;switch(m=c>.5?i/(2-r-l):i/(r+l),r){case e:d=(t-n)/i+(t1&&(a-=1),a<1/6?h+(A-h)*6*a:a<1/2?A:a<2/3?h+(A-h)*(2/3-a)*6:h}if(t===0)r=l=d=n;else{var c=n<.5?n*(1+t):n+t-n*t,i=2*n-c;r=m(i,c,e+1/3),l=m(i,c,e),d=m(i,c,e-1/3)}return{r:r*255,g:l*255,b:d*255}}function jd(e,t,n){e=Fe(e,255),t=Fe(t,255),n=Fe(n,255);var r=Math.max(e,t,n),l=Math.min(e,t,n),d,m,c=r,i=r-l;if(m=r===0?0:i/r,r==l)d=0;else{switch(r){case e:d=(t-n)/i+(t>1)+720)%360;--t;)r.h=(r.h+l)%360,d.push(ue(r));return d}function FM(e,t){t=t||6;for(var n=ue(e).toHsv(),r=n.h,l=n.s,d=n.v,m=[],c=1/t;t--;)m.push(ue({h:r,s:l,v:d})),d=(d+c)%1;return m}ue.mix=function(e,t,n){n=n===0?0:n||50;var r=ue(e).toRgb(),l=ue(t).toRgb(),d=n/100,m={r:(l.r-r.r)*d+r.r,g:(l.g-r.g)*d+r.g,b:(l.b-r.b)*d+r.b,a:(l.a-r.a)*d+r.a};return ue(m)};ue.readability=function(e,t){var n=ue(e),r=ue(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};ue.isReadable=function(e,t,n){var r=ue.readability(e,t),l,d;switch(d=!1,l=GM(n),l.level+l.size){case"AAsmall":case"AAAlarge":d=r>=4.5;break;case"AAlarge":d=r>=3;break;case"AAAsmall":d=r>=7;break}return d};ue.mostReadable=function(e,t,n){var r=null,l=0,d,m,c,i;n=n||{},m=n.includeFallbackColors,c=n.level,i=n.size;for(var h=0;hl&&(l=d,r=ue(t[h]));return ue.isReadable(e,r,{level:c,size:i})||!m?r:(n.includeFallbackColors=!1,ue.mostReadable(e,["#fff","#000"],n))};var tu=ue.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},MM=ue.hexNames=PM(tu);function PM(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function Wv(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Fe(e,t){LM(e)&&(e="100%");var n=RM(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Yo(e){return Math.min(1,Math.max(0,e))}function mt(e){return parseInt(e,16)}function LM(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function RM(e){return typeof e=="string"&&e.indexOf("%")!=-1}function $t(e){return e.length==1?"0"+e:""+e}function Xi(e){return e<=1&&(e=e*100+"%"),e}function Xv(e){return Math.round(parseFloat(e)*255).toString(16)}function Yd(e){return mt(e)/255}var Lt=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",l="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+l),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+l),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+l),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function cn(e){return!!Lt.CSS_UNIT.exec(e)}function NM(e){e=e.replace(vM,"").replace(mM,"").toLowerCase();var t=!1;if(tu[e])e=tu[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Lt.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Lt.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Lt.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Lt.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Lt.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Lt.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Lt.hex8.exec(e))?{r:mt(n[1]),g:mt(n[2]),b:mt(n[3]),a:Yd(n[4]),format:t?"name":"hex8"}:(n=Lt.hex6.exec(e))?{r:mt(n[1]),g:mt(n[2]),b:mt(n[3]),format:t?"name":"hex"}:(n=Lt.hex4.exec(e))?{r:mt(n[1]+""+n[1]),g:mt(n[2]+""+n[2]),b:mt(n[3]+""+n[3]),a:Yd(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Lt.hex3.exec(e))?{r:mt(n[1]+""+n[1]),g:mt(n[2]+""+n[2]),b:mt(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function GM(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}var zd=function(t){var n=["r","g","b","a","h","s","l","v"],r=0,l=0;return pM(n,function(d){if(t[d]&&(r+=1,isNaN(t[d])||(l+=1),d==="s"||d==="l")){var m=/^\d+%$/;m.test(t[d])&&(l+=1)}}),r===l?t:!1},Vi=function(t,n){var r=t.hex?ue(t.hex):ue(t),l=r.toHsl(),d=r.toHsv(),m=r.toRgb(),c=r.toHex();l.s===0&&(l.h=n||0,d.h=n||0);var i=c==="000000"&&m.a===0;return{hsl:l,hex:i?"transparent":"#"+c,rgb:m,hsv:d,oldHue:t.h||n||l.h,source:t.source}},Wn=function(t){if(t==="transparent")return!0;var n=String(t).charAt(0)==="#"?1:0;return t.length!==4+n&&t.length<7+n&&ue(t).isValid()},Lh=function(t){if(!t)return"#fff";var n=Vi(t);if(n.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(n.rgb.r*299+n.rgb.g*587+n.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},Rl=function(t,n){var r=t.replace("°","");return ue(n+" ("+r+")")._ok},$i=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){XM(l,r);function l(){var d,m,c,i;WM(this,l);for(var h=arguments.length,A=Array(h),a=0;ac))return!1;var h=d.get(e),A=d.get(t);if(h&&A)return h==t&&A==e;var a=-1,o=!0,s=n&s8?new lo:void 0;for(d.set(e,t),d.set(t,e);++a=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var As=24,_P=im.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,l=r===void 0?As:r,d=e.height,m=d===void 0?As:d,c=e.style,i=c===void 0?{}:c,h=bP(e,["fill","width","height","style"]);return hg.default.createElement("svg",ug({viewBox:"0 0 "+As+" "+As,style:ug({fill:n,width:l,height:m},i)},h),hg.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},QP=function(){function e(t,n){for(var r=0;r1&&(l.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(l.a*100)/100,source:"rgb"},d)):(l.h||l.s||l.l)&&(typeof l.s=="string"&&l.s.includes("%")&&(l.s=l.s.replace("%","")),typeof l.l=="string"&&l.l.includes("%")&&(l.l=l.l.replace("%","")),l.s==1?l.s=.01:l.l==1&&(l.l=.01),r.props.onChange({h:l.h||r.props.hsl.h,s:Number(cg(l.s)?r.props.hsl.s:l.s),l:Number(cg(l.l)?r.props.hsl.l:l.l),source:"hsl"},d))},r.showHighlight=function(l){l.currentTarget.style.background="#eee"},r.hideHighlight=function(l){l.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?r.state={view:"rgb"}:r.state={view:n.view},r}return QP(t,[{key:"render",value:function(){var r=this,l=Ae({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),d=void 0;return this.state.view==="hex"?d=k.createElement("div",{style:l.fields,className:"flexbox-fix"},k.createElement("div",{style:l.field},k.createElement(ye,{style:{input:l.input,label:l.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?d=k.createElement("div",{style:l.fields,className:"flexbox-fix"},k.createElement("div",{style:l.field},k.createElement(ye,{style:{input:l.input,label:l.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),k.createElement("div",{style:l.field},k.createElement(ye,{style:{input:l.input,label:l.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),k.createElement("div",{style:l.field},k.createElement(ye,{style:{input:l.input,label:l.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),k.createElement("div",{style:l.alpha},k.createElement(ye,{style:{input:l.input,label:l.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(d=k.createElement("div",{style:l.fields,className:"flexbox-fix"},k.createElement("div",{style:l.field},k.createElement(ye,{style:{input:l.input,label:l.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),k.createElement("div",{style:l.field},k.createElement(ye,{style:{input:l.input,label:l.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),k.createElement("div",{style:l.field},k.createElement(ye,{style:{input:l.input,label:l.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),k.createElement("div",{style:l.alpha},k.createElement(ye,{style:{input:l.input,label:l.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),k.createElement("div",{style:l.wrap,className:"flexbox-fix"},d,k.createElement("div",{style:l.toggle},k.createElement("div",{style:l.icon,onClick:this.toggleViews,ref:function(c){return r.icon=c}},k.createElement(_P,{style:l.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,l){return r.hsl.a!==1&&l.view==="hex"?{view:"rgb"}:null}}]),t}(k.Component);am.defaultProps={view:"hex"};var fg=function(){var t=Ae({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return k.createElement("div",{style:t.picker})},OP=function(){var t=Ae({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return k.createElement("div",{style:t.picker})},Uh=function(t){var n=t.width,r=t.onChange,l=t.disableAlpha,d=t.rgb,m=t.hsl,c=t.hsv,i=t.hex,h=t.renderers,A=t.styles,a=A===void 0?{}:A,o=t.className,s=o===void 0?"":o,u=t.defaultView,g=Ae(pt({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+d.r+", "+d.g+", "+d.b+", "+d.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},a),{disableAlpha:l});return k.createElement("div",{style:g.picker,className:"chrome-picker "+s},k.createElement("div",{style:g.saturation},k.createElement(Ho,{style:g.Saturation,hsl:m,hsv:c,pointer:OP,onChange:r})),k.createElement("div",{style:g.body},k.createElement("div",{style:g.controls,className:"flexbox-fix"},k.createElement("div",{style:g.color},k.createElement("div",{style:g.swatch},k.createElement("div",{style:g.active}),k.createElement(_i,{renderers:h}))),k.createElement("div",{style:g.toggles},k.createElement("div",{style:g.hue},k.createElement(Qi,{style:g.Hue,hsl:m,pointer:fg,onChange:r})),k.createElement("div",{style:g.alpha},k.createElement(Qh,{style:g.Alpha,rgb:d,hsl:m,pointer:fg,renderers:h,onChange:r})))),k.createElement(am,{rgb:d,hsl:m,hex:i,view:u,onChange:r,disableAlpha:l})))};Uh.propTypes={width:ae.exports.oneOfType([ae.exports.string,ae.exports.number]),disableAlpha:ae.exports.bool,styles:ae.exports.object,defaultView:ae.exports.oneOf(["hex","rgb","hsl"])};Uh.defaultProps={width:225,disableAlpha:!1,styles:{}};vt(Uh);var FP=function(t){var n=t.color,r=t.onClick,l=r===void 0?function(){}:r,d=t.onSwatchHover,m=t.active,c=Ae({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Lh(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:m,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return k.createElement(Cr,{style:c.color,color:n,onClick:l,onHover:d,focusStyle:{boxShadow:"0 0 4px "+n}},k.createElement("div",{style:c.dot}))},MP=function(t){var n=t.hex,r=t.rgb,l=t.onChange,d=Ae({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),m=function(i,h){i.r||i.g||i.b?l({r:i.r||r.r,g:i.g||r.g,b:i.b||r.b,source:"rgb"},h):l({hex:i.hex,source:"hex"},h)};return k.createElement("div",{style:d.fields,className:"flexbox-fix"},k.createElement("div",{style:d.active}),k.createElement(ye,{style:{wrap:d.HEXwrap,input:d.HEXinput,label:d.HEXlabel},label:"hex",value:n,onChange:m}),k.createElement(ye,{style:{wrap:d.RGBwrap,input:d.RGBinput,label:d.RGBlabel},label:"r",value:r.r,onChange:m}),k.createElement(ye,{style:{wrap:d.RGBwrap,input:d.RGBinput,label:d.RGBlabel},label:"g",value:r.g,onChange:m}),k.createElement(ye,{style:{wrap:d.RGBwrap,input:d.RGBinput,label:d.RGBlabel},label:"b",value:r.b,onChange:m}))},Hh=function(t){var n=t.onChange,r=t.onSwatchHover,l=t.colors,d=t.hex,m=t.rgb,c=t.styles,i=c===void 0?{}:c,h=t.className,A=h===void 0?"":h,a=Ae(pt({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},i)),o=function(u,g){u.hex?Wn(u.hex)&&n({hex:u.hex,source:"hex"},g):n(u,g)};return k.createElement(Ua,{style:a.Compact,styles:i},k.createElement("div",{style:a.compact,className:"compact-picker "+A},k.createElement("div",null,yr(l,function(s){return k.createElement(FP,{key:s,color:s,active:s.toLowerCase()===d,onClick:o,onSwatchHover:r})}),k.createElement("div",{style:a.clear})),k.createElement(MP,{hex:d,rgb:m,onChange:o})))};Hh.propTypes={colors:ae.exports.arrayOf(ae.exports.string),styles:ae.exports.object};Hh.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};vt(Hh);var PP=function(t){var n=t.hover,r=t.color,l=t.onClick,d=t.onSwatchHover,m={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},c=Ae({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:m}},{hover:n});return k.createElement("div",{style:c.swatch},k.createElement(Cr,{color:r,onClick:l,onHover:d,focusStyle:m}))};const LP=_h(PP);var Yh=function(t){var n=t.width,r=t.colors,l=t.onChange,d=t.onSwatchHover,m=t.triangle,c=t.styles,i=c===void 0?{}:c,h=t.className,A=h===void 0?"":h,a=Ae(pt({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},i),{"hide-triangle":m==="hide","top-left-triangle":m==="top-left","top-right-triangle":m==="top-right","bottom-left-triangle":m==="bottom-left","bottom-right-triangle":m==="bottom-right"}),o=function(u,g){return l({hex:u,source:"hex"},g)};return k.createElement("div",{style:a.card,className:"github-picker "+A},k.createElement("div",{style:a.triangleShadow}),k.createElement("div",{style:a.triangle}),yr(r,function(s){return k.createElement(LP,{color:s,key:s,onClick:o,onSwatchHover:d})}))};Yh.propTypes={width:ae.exports.oneOfType([ae.exports.string,ae.exports.number]),colors:ae.exports.arrayOf(ae.exports.string),triangle:ae.exports.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:ae.exports.object};Yh.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};vt(Yh);var RP=function(t){var n=t.direction,r=Ae({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return k.createElement("div",{style:r.picker})},NP=Object.assign||function(e){for(var t=1;t.5});return k.createElement("div",{style:r.picker})},UP=function(){var t=Ae({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return k.createElement("div",{style:t.pointer},k.createElement("div",{style:t.left},k.createElement("div",{style:t.leftInside})),k.createElement("div",{style:t.right},k.createElement("div",{style:t.rightInside})))},Ag=function(t){var n=t.onClick,r=t.label,l=t.children,d=t.active,m=Ae({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:d});return k.createElement("div",{style:m.button,onClick:n},r||l)},HP=function(t){var n=t.rgb,r=t.currentColor,l=Ae({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return k.createElement("div",null,k.createElement("div",{style:l.label},"new"),k.createElement("div",{style:l.swatches},k.createElement("div",{style:l.new}),k.createElement("div",{style:l.current})),k.createElement("div",{style:l.label},"current"))},YP=function(){function e(t,n){for(var r=0;r100&&(A.a=100),A.a/=100,n({h:l.h,s:l.s,l:l.l,a:A.a,source:"rgb"},a))};return k.createElement("div",{style:c.fields,className:"flexbox-fix"},k.createElement("div",{style:c.double},k.createElement(ye,{style:{input:c.input,label:c.label},label:"hex",value:d.replace("#",""),onChange:i})),k.createElement("div",{style:c.single},k.createElement(ye,{style:{input:c.input,label:c.label},label:"r",value:r.r,onChange:i,dragLabel:"true",dragMax:"255"})),k.createElement("div",{style:c.single},k.createElement(ye,{style:{input:c.input,label:c.label},label:"g",value:r.g,onChange:i,dragLabel:"true",dragMax:"255"})),k.createElement("div",{style:c.single},k.createElement(ye,{style:{input:c.input,label:c.label},label:"b",value:r.b,onChange:i,dragLabel:"true",dragMax:"255"})),k.createElement("div",{style:c.alpha},k.createElement(ye,{style:{input:c.input,label:c.label},label:"a",value:Math.round(r.a*100),onChange:i,dragLabel:"true",dragMax:"100"})))},JP=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var ds=24,iL=om.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,l=r===void 0?ds:r,d=e.height,m=d===void 0?ds:d,c=e.style,i=c===void 0?{}:c,h=rL(e,["fill","width","height","style"]);return gg.default.createElement("svg",dg({viewBox:"0 0 "+ds+" "+ds,style:dg({fill:n,width:l,height:m},i)},h),gg.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},aL=function(t){var n=t.color,r=t.onClick,l=r===void 0?function(){}:r,d=t.onSwatchHover,m=t.first,c=t.last,i=t.active,h=Ae({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:Lh(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:m,last:c,active:i,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return k.createElement(Cr,{color:n,style:h.color,onClick:l,onHover:d,focusStyle:{boxShadow:"0 0 4px "+n}},k.createElement("div",{style:h.check},k.createElement(iL,null)))},sL=function(t){var n=t.onClick,r=t.onSwatchHover,l=t.group,d=t.active,m=Ae({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return k.createElement("div",{style:m.group},yr(l,function(c,i){return k.createElement(aL,{key:c,color:c,active:c.toLowerCase()===d,first:i===0,last:i===l.length-1,onClick:n,onSwatchHover:r})}))},Jh=function(t){var n=t.width,r=t.height,l=t.onChange,d=t.onSwatchHover,m=t.colors,c=t.hex,i=t.styles,h=i===void 0?{}:i,A=t.className,a=A===void 0?"":A,o=Ae(pt({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},h)),s=function(g,f){return l({hex:g,source:"hex"},f)};return k.createElement("div",{style:o.picker,className:"swatches-picker "+a},k.createElement(Ua,null,k.createElement("div",{style:o.overflow},k.createElement("div",{style:o.body},yr(m,function(u){return k.createElement(sL,{key:u.toString(),group:u,active:c,onClick:s,onSwatchHover:d})}),k.createElement("div",{style:o.clear})))))};Jh.propTypes={width:ae.exports.oneOfType([ae.exports.string,ae.exports.number]),height:ae.exports.oneOfType([ae.exports.string,ae.exports.number]),colors:ae.exports.arrayOf(ae.exports.arrayOf(ae.exports.string)),styles:ae.exports.object};Jh.defaultProps={width:320,height:240,colors:[[Br[900],Br[700],Br[500],Br[300],Br[100]],[xr[900],xr[700],xr[500],xr[300],xr[100]],[Sr[900],Sr[700],Sr[500],Sr[300],Sr[100]],[br[900],br[700],br[500],br[300],br[100]],[_r[900],_r[700],_r[500],_r[300],_r[100]],[Qr[900],Qr[700],Qr[500],Qr[300],Qr[100]],[kr[900],kr[700],kr[500],kr[300],kr[100]],[Tr[900],Tr[700],Tr[500],Tr[300],Tr[100]],[Dr[900],Dr[700],Dr[500],Dr[300],Dr[100]],["#194D33",Ji[700],Ji[500],Ji[300],Ji[100]],[Or[900],Or[700],Or[500],Or[300],Or[100]],[Fr[900],Fr[700],Fr[500],Fr[300],Fr[100]],[Mr[900],Mr[700],Mr[500],Mr[300],Mr[100]],[Pr[900],Pr[700],Pr[500],Pr[300],Pr[100]],[Lr[900],Lr[700],Lr[500],Lr[300],Lr[100]],[Rr[900],Rr[700],Rr[500],Rr[300],Rr[100]],[Nr[900],Nr[700],Nr[500],Nr[300],Nr[100]],[Gr[900],Gr[700],Gr[500],Gr[300],Gr[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};vt(Jh);var Kh=function(t){var n=t.onChange,r=t.onSwatchHover,l=t.hex,d=t.colors,m=t.width,c=t.triangle,i=t.styles,h=i===void 0?{}:i,A=t.className,a=A===void 0?"":A,o=Ae(pt({default:{card:{width:m,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},h),{"hide-triangle":c==="hide","top-left-triangle":c==="top-left","top-right-triangle":c==="top-right"}),s=function(g,f){Wn(g)&&n({hex:g,source:"hex"},f)};return k.createElement("div",{style:o.card,className:"twitter-picker "+a},k.createElement("div",{style:o.triangleShadow}),k.createElement("div",{style:o.triangle}),k.createElement("div",{style:o.body},yr(d,function(u,g){return k.createElement(Cr,{key:g,color:u,hex:u,style:o.swatch,onClick:s,onHover:r,focusStyle:{boxShadow:"0 0 4px "+u}})}),k.createElement("div",{style:o.hash},"#"),k.createElement(ye,{label:null,style:{input:o.input},value:l.replace("#",""),onChange:s}),k.createElement("div",{style:o.clear})))};Kh.propTypes={width:ae.exports.oneOfType([ae.exports.string,ae.exports.number]),triangle:ae.exports.oneOf(["hide","top-left","top-right"]),colors:ae.exports.arrayOf(ae.exports.string),styles:ae.exports.object};Kh.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};vt(Kh);var qh=function(t){var n=Ae({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(t.hsl.h)+", "+Math.round(t.hsl.s*100)+"%, "+Math.round(t.hsl.l*100)+"%)"}}});return k.createElement("div",{style:n.picker})};qh.propTypes={hsl:ae.exports.shape({h:ae.exports.number,s:ae.exports.number,l:ae.exports.number,a:ae.exports.number})};qh.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Zh=function(t){var n=Ae({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(t.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return k.createElement("div",{style:n.picker})};Zh.propTypes={hsl:ae.exports.shape({h:ae.exports.number,s:ae.exports.number,l:ae.exports.number,a:ae.exports.number})};Zh.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var oL=function(t){var n=t.onChange,r=t.rgb,l=t.hsl,d=t.hex,m=t.hsv,c=function(s,u){if(s.hex)Wn(s.hex)&&n({hex:s.hex,source:"hex"},u);else if(s.rgb){var g=s.rgb.split(",");Rl(s.rgb,"rgb")&&n({r:g[0],g:g[1],b:g[2],a:1,source:"rgb"},u)}else if(s.hsv){var f=s.hsv.split(",");Rl(s.hsv,"hsv")&&(f[2]=f[2].replace("%",""),f[1]=f[1].replace("%",""),f[0]=f[0].replace("°",""),f[1]==1?f[1]=.01:f[2]==1&&(f[2]=.01),n({h:Number(f[0]),s:Number(f[1]),v:Number(f[2]),source:"hsv"},u))}else if(s.hsl){var p=s.hsl.split(",");Rl(s.hsl,"hsl")&&(p[2]=p[2].replace("%",""),p[1]=p[1].replace("%",""),p[0]=p[0].replace("°",""),a[1]==1?a[1]=.01:a[2]==1&&(a[2]=.01),n({h:Number(p[0]),s:Number(p[1]),v:Number(p[2]),source:"hsl"},u))}},i=Ae({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),h=r.r+", "+r.g+", "+r.b,A=Math.round(l.h)+"°, "+Math.round(l.s*100)+"%, "+Math.round(l.l*100)+"%",a=Math.round(m.h)+"°, "+Math.round(m.s*100)+"%, "+Math.round(m.v*100)+"%";return k.createElement("div",{style:i.wrap,className:"flexbox-fix"},k.createElement("div",{style:i.fields},k.createElement("div",{style:i.double},k.createElement(ye,{style:{input:i.input,label:i.label},label:"hex",value:d,onChange:c})),k.createElement("div",{style:i.column},k.createElement("div",{style:i.single},k.createElement(ye,{style:{input:i.input2,label:i.label2},label:"rgb",value:h,onChange:c})),k.createElement("div",{style:i.single},k.createElement(ye,{style:{input:i.input2,label:i.label2},label:"hsv",value:a,onChange:c})),k.createElement("div",{style:i.single},k.createElement(ye,{style:{input:i.input2,label:i.label2},label:"hsl",value:A,onChange:c})))))},ef=function(t){var n=t.width,r=t.onChange,l=t.rgb,d=t.hsl,m=t.hsv,c=t.hex,i=t.header,h=t.styles,A=h===void 0?{}:h,a=t.className,o=a===void 0?"":a,s=Ae(pt({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+l.r+", "+l.g+", "+l.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},A));return k.createElement("div",{style:s.picker,className:"google-picker "+o},k.createElement("div",{style:s.head},i),k.createElement("div",{style:s.swatch}),k.createElement("div",{style:s.saturation},k.createElement(Ho,{hsl:d,hsv:m,pointer:qh,onChange:r})),k.createElement("div",{style:s.body},k.createElement("div",{style:s.controls,className:"flexbox-fix"},k.createElement("div",{style:s.hue},k.createElement(Qi,{style:s.Hue,hsl:d,radius:"4px",pointer:Zh,onChange:r}))),k.createElement(oL,{rgb:l,hsl:d,hex:c,hsv:m,onChange:r})))};ef.propTypes={width:ae.exports.oneOfType([ae.exports.string,ae.exports.number]),styles:ae.exports.object,header:ae.exports.string};ef.defaultProps={width:652,styles:{},header:"Color picker"};vt(ef);function su({item:e}){const{name:t,value:n,handler:r}=e,[l,d]=K.exports.useState(n),[m,c]=K.exports.useState(!1),i=A=>{const{r:a,g:o,b:s,a:u}=A.rgb,g=`rgba(${a}, ${o}, ${s}, ${u})`;r(g)},h=A=>{if(!m){const a=()=>{c(!1),window.removeEventListener("click",a)};setTimeout(()=>{window.addEventListener("click",a)})}c(!m)};return K.exports.useEffect(()=>{d(n)},[n]),pe("div",{className:C2.color,children:[U("div",{className:"name",children:t}),U("div",{className:"color-bar-wrapper",onClick:h,children:U("div",{className:"color-bar",style:{backgroundColor:l}})}),U("div",{className:"picker-wrapper",onClick:A=>A.stopPropagation(),children:m&&U(qP,{onChange:i,color:l})})]})}const lL={"icon-bar":"_icon-bar_1vdkp_1"};function cL({item:e}){const{name:t,value:n,iconTypes:r,labels:l,handler:d}=e,m=c=>{d(c)};return pe("div",{className:lL["icon-bar"],children:[U("div",{className:"name",children:t}),U("div",{className:"icon-list",children:r.map((c,i)=>U("div",{className:zt("icon-wrapper",n[i]&&"icon-active"),onClick:()=>m(c),children:U(Fc,{text:l[i],children:U(Dt,{type:c})})},c))})]})}const uL="_select_zpj30_1",hL={select:uL};function fL({item:e}){const{name:t,value:n,handler:r,options:l}=e,[d,m]=K.exports.useState(n),c=i=>{r&&r(i)};return K.exports.useEffect(()=>{m(n)},[n]),pe("div",{className:hL.select,children:[U("div",{className:"name",children:t}),U("div",{className:"com-select",children:U(c1,{options:l,onChange:c,value:d})})]})}function AL(){const[e,t]=K.exports.useState(null);return K.exports.useLayoutEffect(()=>{const n=()=>{if(!ce.current)return;const r=ce.current.getSelected();if(r.length>=2){t(null);return}const d=(r[0]||ce.current).getFormObject();t(d)};return n(),at.on("selection-change",n),at.on("update-config",n),()=>{at.off("selection-change",n),at.off("update-config",n)}},[]),pe("div",{className:c2.attr,children:[U("div",{className:"title",children:e?e.name:"组合"}),U("div",{className:"divider"}),e===null&&U("div",{className:"empty",children:"组合暂不支持编辑"}),e&&e.items.map(n=>n.type==="double-input"?U(Y0,{item:n},n.id):n.type==="upload-image"?U(f2,{item:n},n.id):n.type==="range"?U(zc,{item:n},n.id):n.type==="textarea"?U(v2,{item:n},n.id):n.type==="icon-bar"?U(cL,{item:n},n.id):n.type==="color"?U(su,{item:n},n.id):n.type==="button"?U(nn,{style:{width:263,margin:"16px 0 0 16px"},onClick:n.handler,children:n.name},n.id):n.type==="select"?U(fL,{item:n},n.id):null)]})}const dL="_material_23e1r_1",gL={material:dL};function pL(){const[e,t]=K.exports.useState(!1),n=l=>{const d=l.target.files&&l.target.files[0];if(d===null)return;l.target.value="";const m=new FileReader;m.readAsDataURL(d),m.onload=c=>{const i=c.target.result;r(i)}},r=async l=>{if(e)return;const d=ce.current;if(!d)return;t(!0);const m=await Qo.create({imageUrl:l});d.add(m),t(!1)};return pe("div",{className:gL.material,children:[pe(nn,{style:{width:"100%"},loading:e,children:["添加本地图片",U("input",{className:"hide-input",type:"file",accept:"image/*",onChange:n})]}),U("div",{className:"divider"}),U(bo,{type:"material"})]})}const vL="_text_auhaz_1",mL={text:vL};function CL(){const[e,t]=K.exports.useState(!1),n=async()=>{if(e)return;const r=ce.current;if(!r)return;t(!0);const l=await eo.create();r.add(l),t(!1)};return pe("div",{className:mL.text,children:[U(nn,{style:{width:"100%"},onClick:n,loading:e,children:"添加文本"}),U("div",{className:"divider"}),U(bo,{type:"text",showDropdown:!1,showSearch:!1})]})}const yL="_my_19yym_1",EL={my:yL},wL=[{id:"created",text:"文件库"},{id:"favorite",text:"收藏"},{id:"shared",text:"分享"}],IL=[{id:"material",text:"素材"},{id:"template",text:"模板"}];function BL(){const e=K.exports.useRef({created:[],shared:[],favorite:[]}),[t,n]=K.exports.useState([]),[r,l]=K.exports.useState("created"),[d,m]=K.exports.useState("material"),c=u=>{l(u.id)},i=u=>{m(u)},h=(u,g)=>{u.text==="编辑"||(u.text==="收藏"?A():u.text==="分享"?a():u.text==="删除"&&o())},A=async u=>{},a=async u=>{},o=async u=>{},s=()=>{const u=e.current[r];n(u.filter(g=>g.type===d))};return K.exports.useEffect(s,[r,d]),pe("div",{className:EL.my,children:[U(p1,{tabs:wL,onChange:c}),U("div",{className:"types",children:IL.map(u=>U("div",{className:zt("type",d===u.id&&"type-selected"),onClick:()=>i(u.id),children:u.text},u.id))}),t.length>0&&U(bo,{type:"custom",showSearch:!1,items:[{title:"",hasMore:!1,items:t}],onDropdownItemClick:h,dropdownListGenerator:u=>[{icon:"icon-edit",text:"编辑",checked:!1},{icon:"icon-heart-fill",text:"收藏",checked:u.isFav,hide:r==="shared"},{icon:"icon-share",text:"分享",checked:u.isShared,hide:r==="favorite"},{icon:"icon-delete",text:"删除",checked:!1,hide:r!=="created"}]})]})}const xL="_shape_3s4s4_1",SL={shape:xL};function bL(){const[e,t]=K.exports.useState(!1),[n,r]=K.exports.useState("rgba(255,192,203,1)"),[l,d]=K.exports.useState(1),[m,c]=K.exports.useState(!1),[i,h]=K.exports.useState("rgba(56,209,236,1)"),[A,a]=K.exports.useState([10,10]),[o,s]=K.exports.useState(10),u=async()=>{const I=ce.current;if(!I)return;const S=await S0.create({});I.add(S)},g=I=>{const S=ce.current;S&&(I&&en.show("按住 Shift 键可画出直线哦~"),S.instance.isDrawingMode=I,S.instance.freeDrawingBrush.color=n,t(I))},f=I=>{const S=ce.current;S&&(S.instance.freeDrawingBrush.width=I,d(I))},p=I=>{const S=ce.current;S&&(S.instance.freeDrawingBrush.color=I,r(I))},v=I=>{const S=ce.current;S&&(S.instance.freeDrawingBrush.shadow.color=I,h(I))},C=I=>{const S=ce.current;S&&(c(I),I?S.instance.freeDrawingBrush.shadow=new Ne.fabric.Shadow({blur:o,offsetX:A[0],offsetY:A[1],affectStroke:!0,color:i}):S.instance.freeDrawingBrush.shadow=null)},w=[{id:"width",type:"range",name:"画笔宽度",value:l,max:40,handler:f},{id:"color",type:"color",name:"画笔颜色",value:n,handler:p},{id:"shadowColor",type:"color",name:"阴影颜色",value:i,handler:v},{id:"offset",type:"double-input",name:"阴影偏移",label:["X","Y"],value:A,handler:(I,S)=>{const D=ce.current;D&&(D.instance.freeDrawingBrush.shadow.offsetX=I,D.instance.freeDrawingBrush.shadow.offsetY=S,a([I,S]))}},{id:"blur",type:"range",name:"阴影模糊度",value:o,max:80,handler:I=>{const S=ce.current;S&&(S.instance.freeDrawingBrush.shadow.blur=I,s(I))}}];return K.exports.useEffect(()=>{const I=ce.current;if(!I)return;r(I.instance.freeDrawingBrush.color),d(I.instance.freeDrawingBrush.width);const S=Boolean(I.instance.freeDrawingBrush.shadow);return c(S),S&&(h(I.instance.freeDrawingBrush.shadow.color),a([I.instance.freeDrawingBrush.shadow.offsetX,I.instance.freeDrawingBrush.shadow.offsetY]),s(I.instance.freeDrawingBrush.shadow.blur)),()=>{I.instance.isDrawingMode=!1}},[]),pe("div",{className:SL.shape,children:[U(nn,{onClick:u,style:{width:263,margin:"16px 0 0 16px"},children:"添加矩形"}),U("div",{className:"divider",style:{margin:"16px"}}),pe("div",{className:"switch-wrapper",children:["自由绘画模式",U(mA,{checked:e,onChange:g})]}),e&&pe("div",{children:[U(zc,{item:w[0]}),U(su,{item:w[1]}),pe("div",{className:"switch-wrapper",children:["阴影开关",U(mA,{checked:m,onChange:C})]}),m&&pe("div",{children:[U(su,{item:w[2]}),U(Y0,{item:w[3]}),U(zc,{item:w[4]})]})]})]})}const _L=[{id:"template",iconType:"icon-template",text:"模板"},{id:"material",iconType:"icon-material",text:"素材"},{id:"shape",iconType:"icon-shape",text:"图形"},{id:"text",iconType:"icon-text",text:"文本"},{id:"attr",iconType:"icon-attr",text:"属性"},{id:"my",iconType:"icon-my",text:"我的"}];function QL(){const[e,t]=K.exports.useState("template"),n=r=>{t(r.id)};return K.exports.useEffect(()=>{const r=()=>{!ce.current||ce.current.getSelected().length===0||t("attr")};return at.on("selection-change",r),()=>{at.off("selection-change",r)}},[]),pe("div",{className:_l.sidebar,children:[U("div",{className:_l.tabs,children:_L.map(r=>pe("div",{className:zt("tab",e===r.id&&"tab-active"),onClick:()=>n(r),children:[U(Dt,{className:"tab-icon",type:r.iconType}),U("div",{className:"tab-text",children:r.text})]},r.id))}),pe("div",{className:_l.main,children:[e==="template"&&U(o2,{}),e==="material"&&U(pL,{}),e==="text"&&U(CL,{}),e==="shape"&&U(bL,{}),e==="attr"&&U(AL,{}),e==="my"&&U(BL,{})]})]})}const lm={id:"",name:`新建画布${Date.now()}`,internal:!1,type:"template",tag:"推荐位",image:"",data:null},tf=K.exports.createContext(lm);function kL(){const[e,t]=K.exports.useState(!0),[n,r]=K.exports.useState(lm);return K.exports.useEffect(()=>{zy(500).then(()=>{t(!1)})},[]),e?U("div",{className:Cl.app,children:U("div",{className:Cl.mask,children:U(r1,{})})}):U(tf.Provider,{value:n,children:pe("div",{className:Cl.app,children:[U(t2,{}),U(QL,{}),U(O1,{})]})})}window._iconfont_svg_string_3899988='',function(e){var n=(n=document.getElementsByTagName("script"))[n.length-1],t=n.getAttribute("data-injectcss"),n=n.getAttribute("data-disable-injectsvg");if(!n){var r,l,d,m,c,i=function(a,o){o.parentNode.insertBefore(a,o)};if(t&&!e.__iconfont__svg__cssinject__){e.__iconfont__svg__cssinject__=!0;try{document.write("")}catch{}}r=function(){var a,o=document.createElement("div");o.innerHTML=e._iconfont_svg_string_3899988,(o=o.getElementsByTagName("svg")[0])&&(o.setAttribute("aria-hidden","true"),o.style.position="absolute",o.style.width=0,o.style.height=0,o.style.overflow="hidden",o=o,(a=document.body).firstChild?i(o,a.firstChild):a.appendChild(o))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(r,0):(l=function(){document.removeEventListener("DOMContentLoaded",l,!1),r()},document.addEventListener("DOMContentLoaded",l,!1)):document.attachEvent&&(d=r,m=e.document,c=!1,A(),m.onreadystatechange=function(){m.readyState=="complete"&&(m.onreadystatechange=null,h())})}function h(){c||(c=!0,d())}function A(){try{m.documentElement.doScroll("left")}catch{return void setTimeout(A,50)}h()}}(window);Qs.createRoot(document.getElementById("root")).render(U(kL,{}))});export default TL(); + `),k.createElement("div",{style:d.white,className:"saturation-white"},k.createElement("div",{style:d.black,className:"saturation-black"}),k.createElement("div",{style:d.pointer},this.props.pointer?k.createElement(this.props.pointer,this.props):k.createElement("div",{style:d.circle}))))}}]),t}(K.exports.PureComponent||K.exports.Component);function iM(e,t){for(var n=-1,r=e==null?0:e.length;++n=0,A=!n&&l&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return A?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return ue(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(xM,arguments)},brighten:function(){return this._applyModification(SM,arguments)},darken:function(){return this._applyModification(bM,arguments)},desaturate:function(){return this._applyModification(wM,arguments)},saturate:function(){return this._applyModification(IM,arguments)},greyscale:function(){return this._applyModification(BM,arguments)},spin:function(){return this._applyModification(_M,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(TM,arguments)},complement:function(){return this._applyCombination(QM,arguments)},monochromatic:function(){return this._applyCombination(DM,arguments)},splitcomplement:function(){return this._applyCombination(kM,arguments)},triad:function(){return this._applyCombination(HA,[3])},tetrad:function(){return this._applyCombination(HA,[4])}};ue.fromRatio=function(e,t){if(lo(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Xi(e[r]));e=n}return ue(e,t)};function vM(e){var t={r:0,g:0,b:0},n=1,r=null,l=null,A=null,m=!1,c=!1;return typeof e=="string"&&(e=LM(e)),lo(e)=="object"&&(cn(e.r)&&cn(e.g)&&cn(e.b)?(t=mM(e.r,e.g,e.b),m=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):cn(e.h)&&cn(e.s)&&cn(e.v)?(r=Xi(e.s),l=Xi(e.v),t=yM(e.h,r,l),m=!0,c="hsv"):cn(e.h)&&cn(e.s)&&cn(e.l)&&(r=Xi(e.s),A=Xi(e.l),t=CM(e.h,r,A),m=!0,c="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=Wv(n),{ok:m,format:e.format||c,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function mM(e,t,n){return{r:Fe(e,255)*255,g:Fe(t,255)*255,b:Fe(n,255)*255}}function GA(e,t,n){e=Fe(e,255),t=Fe(t,255),n=Fe(n,255);var r=Math.max(e,t,n),l=Math.min(e,t,n),A,m,c=(r+l)/2;if(r==l)A=m=0;else{var i=r-l;switch(m=c>.5?i/(2-r-l):i/(r+l),r){case e:A=(t-n)/i+(t1&&(a-=1),a<1/6?h+(d-h)*6*a:a<1/2?d:a<2/3?h+(d-h)*(2/3-a)*6:h}if(t===0)r=l=A=n;else{var c=n<.5?n*(1+t):n+t-n*t,i=2*n-c;r=m(i,c,e+1/3),l=m(i,c,e),A=m(i,c,e-1/3)}return{r:r*255,g:l*255,b:A*255}}function jA(e,t,n){e=Fe(e,255),t=Fe(t,255),n=Fe(n,255);var r=Math.max(e,t,n),l=Math.min(e,t,n),A,m,c=r,i=r-l;if(m=r===0?0:i/r,r==l)A=0;else{switch(r){case e:A=(t-n)/i+(t>1)+720)%360;--t;)r.h=(r.h+l)%360,A.push(ue(r));return A}function DM(e,t){t=t||6;for(var n=ue(e).toHsv(),r=n.h,l=n.s,A=n.v,m=[],c=1/t;t--;)m.push(ue({h:r,s:l,v:A})),A=(A+c)%1;return m}ue.mix=function(e,t,n){n=n===0?0:n||50;var r=ue(e).toRgb(),l=ue(t).toRgb(),A=n/100,m={r:(l.r-r.r)*A+r.r,g:(l.g-r.g)*A+r.g,b:(l.b-r.b)*A+r.b,a:(l.a-r.a)*A+r.a};return ue(m)};ue.readability=function(e,t){var n=ue(e),r=ue(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};ue.isReadable=function(e,t,n){var r=ue.readability(e,t),l,A;switch(A=!1,l=RM(n),l.level+l.size){case"AAsmall":case"AAAlarge":A=r>=4.5;break;case"AAlarge":A=r>=3;break;case"AAAsmall":A=r>=7;break}return A};ue.mostReadable=function(e,t,n){var r=null,l=0,A,m,c,i;n=n||{},m=n.includeFallbackColors,c=n.level,i=n.size;for(var h=0;hl&&(l=A,r=ue(t[h]));return ue.isReadable(e,r,{level:c,size:i})||!m?r:(n.includeFallbackColors=!1,ue.mostReadable(e,["#fff","#000"],n))};var tu=ue.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},OM=ue.hexNames=FM(tu);function FM(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function Wv(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Fe(e,t){MM(e)&&(e="100%");var n=PM(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Yo(e){return Math.min(1,Math.max(0,e))}function mt(e){return parseInt(e,16)}function MM(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function PM(e){return typeof e=="string"&&e.indexOf("%")!=-1}function $t(e){return e.length==1?"0"+e:""+e}function Xi(e){return e<=1&&(e=e*100+"%"),e}function Xv(e){return Math.round(parseFloat(e)*255).toString(16)}function YA(e){return mt(e)/255}var Lt=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",l="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+l),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+l),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+l),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function cn(e){return!!Lt.CSS_UNIT.exec(e)}function LM(e){e=e.replace(gM,"").replace(pM,"").toLowerCase();var t=!1;if(tu[e])e=tu[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Lt.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Lt.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Lt.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Lt.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Lt.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Lt.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Lt.hex8.exec(e))?{r:mt(n[1]),g:mt(n[2]),b:mt(n[3]),a:YA(n[4]),format:t?"name":"hex8"}:(n=Lt.hex6.exec(e))?{r:mt(n[1]),g:mt(n[2]),b:mt(n[3]),format:t?"name":"hex"}:(n=Lt.hex4.exec(e))?{r:mt(n[1]+""+n[1]),g:mt(n[2]+""+n[2]),b:mt(n[3]+""+n[3]),a:YA(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Lt.hex3.exec(e))?{r:mt(n[1]+""+n[1]),g:mt(n[2]+""+n[2]),b:mt(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function RM(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}var zA=function(t){var n=["r","g","b","a","h","s","l","v"],r=0,l=0;return AM(n,function(A){if(t[A]&&(r+=1,isNaN(t[A])||(l+=1),A==="s"||A==="l")){var m=/^\d+%$/;m.test(t[A])&&(l+=1)}}),r===l?t:!1},Vi=function(t,n){var r=t.hex?ue(t.hex):ue(t),l=r.toHsl(),A=r.toHsv(),m=r.toRgb(),c=r.toHex();l.s===0&&(l.h=n||0,A.h=n||0);var i=c==="000000"&&m.a===0;return{hsl:l,hex:i?"transparent":"#"+c,rgb:m,hsv:A,oldHue:t.h||n||l.h,source:t.source}},Wn=function(t){if(t==="transparent")return!0;var n=String(t).charAt(0)==="#"?1:0;return t.length!==4+n&&t.length<7+n&&ue(t).isValid()},Lh=function(t){if(!t)return"#fff";var n=Vi(t);if(n.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(n.rgb.r*299+n.rgb.g*587+n.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},Ll=function(t,n){var r=t.replace("°","");return ue(n+" ("+r+")")._ok},$i=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){zM(l,r);function l(){var A,m,c,i;YM(this,l);for(var h=arguments.length,d=Array(h),a=0;ac))return!1;var h=A.get(e),d=A.get(t);if(h&&d)return h==t&&d==e;var a=-1,o=!0,s=n&i8?new co:void 0;for(A.set(e,t),A.set(t,e);++a=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var As=24,SP=im.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,l=r===void 0?As:r,A=e.height,m=A===void 0?As:A,c=e.style,i=c===void 0?{}:c,h=xP(e,["fill","width","height","style"]);return hg.default.createElement("svg",ug({viewBox:"0 0 "+As+" "+As,style:ug({fill:n,width:l,height:m},i)},h),hg.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},bP=function(){function e(t,n){for(var r=0;r1&&(l.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(l.a*100)/100,source:"rgb"},A)):(l.h||l.s||l.l)&&(typeof l.s=="string"&&l.s.includes("%")&&(l.s=l.s.replace("%","")),typeof l.l=="string"&&l.l.includes("%")&&(l.l=l.l.replace("%","")),l.s==1?l.s=.01:l.l==1&&(l.l=.01),r.props.onChange({h:l.h||r.props.hsl.h,s:Number(cg(l.s)?r.props.hsl.s:l.s),l:Number(cg(l.l)?r.props.hsl.l:l.l),source:"hsl"},A))},r.showHighlight=function(l){l.currentTarget.style.background="#eee"},r.hideHighlight=function(l){l.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?r.state={view:"rgb"}:r.state={view:n.view},r}return bP(t,[{key:"render",value:function(){var r=this,l=de({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),A=void 0;return this.state.view==="hex"?A=k.createElement("div",{style:l.fields,className:"flexbox-fix"},k.createElement("div",{style:l.field},k.createElement(ye,{style:{input:l.input,label:l.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?A=k.createElement("div",{style:l.fields,className:"flexbox-fix"},k.createElement("div",{style:l.field},k.createElement(ye,{style:{input:l.input,label:l.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),k.createElement("div",{style:l.field},k.createElement(ye,{style:{input:l.input,label:l.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),k.createElement("div",{style:l.field},k.createElement(ye,{style:{input:l.input,label:l.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),k.createElement("div",{style:l.alpha},k.createElement(ye,{style:{input:l.input,label:l.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(A=k.createElement("div",{style:l.fields,className:"flexbox-fix"},k.createElement("div",{style:l.field},k.createElement(ye,{style:{input:l.input,label:l.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),k.createElement("div",{style:l.field},k.createElement(ye,{style:{input:l.input,label:l.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),k.createElement("div",{style:l.field},k.createElement(ye,{style:{input:l.input,label:l.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),k.createElement("div",{style:l.alpha},k.createElement(ye,{style:{input:l.input,label:l.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),k.createElement("div",{style:l.wrap,className:"flexbox-fix"},A,k.createElement("div",{style:l.toggle},k.createElement("div",{style:l.icon,onClick:this.toggleViews,ref:function(c){return r.icon=c}},k.createElement(SP,{style:l.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,l){return r.hsl.a!==1&&l.view==="hex"?{view:"rgb"}:null}}]),t}(k.Component);am.defaultProps={view:"hex"};var fg=function(){var t=de({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return k.createElement("div",{style:t.picker})},TP=function(){var t=de({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return k.createElement("div",{style:t.picker})},Uh=function(t){var n=t.width,r=t.onChange,l=t.disableAlpha,A=t.rgb,m=t.hsl,c=t.hsv,i=t.hex,h=t.renderers,d=t.styles,a=d===void 0?{}:d,o=t.className,s=o===void 0?"":o,u=t.defaultView,g=de(pt({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+A.r+", "+A.g+", "+A.b+", "+A.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},a),{disableAlpha:l});return k.createElement("div",{style:g.picker,className:"chrome-picker "+s},k.createElement("div",{style:g.saturation},k.createElement(Ho,{style:g.Saturation,hsl:m,hsv:c,pointer:TP,onChange:r})),k.createElement("div",{style:g.body},k.createElement("div",{style:g.controls,className:"flexbox-fix"},k.createElement("div",{style:g.color},k.createElement("div",{style:g.swatch},k.createElement("div",{style:g.active}),k.createElement(_i,{renderers:h}))),k.createElement("div",{style:g.toggles},k.createElement("div",{style:g.hue},k.createElement(Qi,{style:g.Hue,hsl:m,pointer:fg,onChange:r})),k.createElement("div",{style:g.alpha},k.createElement(Qh,{style:g.Alpha,rgb:A,hsl:m,pointer:fg,renderers:h,onChange:r})))),k.createElement(am,{rgb:A,hsl:m,hex:i,view:u,onChange:r,disableAlpha:l})))};Uh.propTypes={width:ae.exports.oneOfType([ae.exports.string,ae.exports.number]),disableAlpha:ae.exports.bool,styles:ae.exports.object,defaultView:ae.exports.oneOf(["hex","rgb","hsl"])};Uh.defaultProps={width:225,disableAlpha:!1,styles:{}};vt(Uh);var DP=function(t){var n=t.color,r=t.onClick,l=r===void 0?function(){}:r,A=t.onSwatchHover,m=t.active,c=de({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Lh(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:m,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return k.createElement(Cr,{style:c.color,color:n,onClick:l,onHover:A,focusStyle:{boxShadow:"0 0 4px "+n}},k.createElement("div",{style:c.dot}))},OP=function(t){var n=t.hex,r=t.rgb,l=t.onChange,A=de({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),m=function(i,h){i.r||i.g||i.b?l({r:i.r||r.r,g:i.g||r.g,b:i.b||r.b,source:"rgb"},h):l({hex:i.hex,source:"hex"},h)};return k.createElement("div",{style:A.fields,className:"flexbox-fix"},k.createElement("div",{style:A.active}),k.createElement(ye,{style:{wrap:A.HEXwrap,input:A.HEXinput,label:A.HEXlabel},label:"hex",value:n,onChange:m}),k.createElement(ye,{style:{wrap:A.RGBwrap,input:A.RGBinput,label:A.RGBlabel},label:"r",value:r.r,onChange:m}),k.createElement(ye,{style:{wrap:A.RGBwrap,input:A.RGBinput,label:A.RGBlabel},label:"g",value:r.g,onChange:m}),k.createElement(ye,{style:{wrap:A.RGBwrap,input:A.RGBinput,label:A.RGBlabel},label:"b",value:r.b,onChange:m}))},Hh=function(t){var n=t.onChange,r=t.onSwatchHover,l=t.colors,A=t.hex,m=t.rgb,c=t.styles,i=c===void 0?{}:c,h=t.className,d=h===void 0?"":h,a=de(pt({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},i)),o=function(u,g){u.hex?Wn(u.hex)&&n({hex:u.hex,source:"hex"},g):n(u,g)};return k.createElement(Ha,{style:a.Compact,styles:i},k.createElement("div",{style:a.compact,className:"compact-picker "+d},k.createElement("div",null,yr(l,function(s){return k.createElement(DP,{key:s,color:s,active:s.toLowerCase()===A,onClick:o,onSwatchHover:r})}),k.createElement("div",{style:a.clear})),k.createElement(OP,{hex:A,rgb:m,onChange:o})))};Hh.propTypes={colors:ae.exports.arrayOf(ae.exports.string),styles:ae.exports.object};Hh.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};vt(Hh);var FP=function(t){var n=t.hover,r=t.color,l=t.onClick,A=t.onSwatchHover,m={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},c=de({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:m}},{hover:n});return k.createElement("div",{style:c.swatch},k.createElement(Cr,{color:r,onClick:l,onHover:A,focusStyle:m}))};const MP=_h(FP);var Yh=function(t){var n=t.width,r=t.colors,l=t.onChange,A=t.onSwatchHover,m=t.triangle,c=t.styles,i=c===void 0?{}:c,h=t.className,d=h===void 0?"":h,a=de(pt({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},i),{"hide-triangle":m==="hide","top-left-triangle":m==="top-left","top-right-triangle":m==="top-right","bottom-left-triangle":m==="bottom-left","bottom-right-triangle":m==="bottom-right"}),o=function(u,g){return l({hex:u,source:"hex"},g)};return k.createElement("div",{style:a.card,className:"github-picker "+d},k.createElement("div",{style:a.triangleShadow}),k.createElement("div",{style:a.triangle}),yr(r,function(s){return k.createElement(MP,{color:s,key:s,onClick:o,onSwatchHover:A})}))};Yh.propTypes={width:ae.exports.oneOfType([ae.exports.string,ae.exports.number]),colors:ae.exports.arrayOf(ae.exports.string),triangle:ae.exports.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:ae.exports.object};Yh.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};vt(Yh);var PP=function(t){var n=t.direction,r=de({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return k.createElement("div",{style:r.picker})},LP=Object.assign||function(e){for(var t=1;t.5});return k.createElement("div",{style:r.picker})},jP=function(){var t=de({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return k.createElement("div",{style:t.pointer},k.createElement("div",{style:t.left},k.createElement("div",{style:t.leftInside})),k.createElement("div",{style:t.right},k.createElement("div",{style:t.rightInside})))},dg=function(t){var n=t.onClick,r=t.label,l=t.children,A=t.active,m=de({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:A});return k.createElement("div",{style:m.button,onClick:n},r||l)},$P=function(t){var n=t.rgb,r=t.currentColor,l=de({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return k.createElement("div",null,k.createElement("div",{style:l.label},"new"),k.createElement("div",{style:l.swatches},k.createElement("div",{style:l.new}),k.createElement("div",{style:l.current})),k.createElement("div",{style:l.label},"current"))},UP=function(){function e(t,n){for(var r=0;r100&&(d.a=100),d.a/=100,n({h:l.h,s:l.s,l:l.l,a:d.a,source:"rgb"},a))};return k.createElement("div",{style:c.fields,className:"flexbox-fix"},k.createElement("div",{style:c.double},k.createElement(ye,{style:{input:c.input,label:c.label},label:"hex",value:A.replace("#",""),onChange:i})),k.createElement("div",{style:c.single},k.createElement(ye,{style:{input:c.input,label:c.label},label:"r",value:r.r,onChange:i,dragLabel:"true",dragMax:"255"})),k.createElement("div",{style:c.single},k.createElement(ye,{style:{input:c.input,label:c.label},label:"g",value:r.g,onChange:i,dragLabel:"true",dragMax:"255"})),k.createElement("div",{style:c.single},k.createElement(ye,{style:{input:c.input,label:c.label},label:"b",value:r.b,onChange:i,dragLabel:"true",dragMax:"255"})),k.createElement("div",{style:c.alpha},k.createElement(ye,{style:{input:c.input,label:c.label},label:"a",value:Math.round(r.a*100),onChange:i,dragLabel:"true",dragMax:"100"})))},XP=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var gs=24,nL=om.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,l=r===void 0?gs:r,A=e.height,m=A===void 0?gs:A,c=e.style,i=c===void 0?{}:c,h=tL(e,["fill","width","height","style"]);return gg.default.createElement("svg",Ag({viewBox:"0 0 "+gs+" "+gs,style:Ag({fill:n,width:l,height:m},i)},h),gg.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},rL=function(t){var n=t.color,r=t.onClick,l=r===void 0?function(){}:r,A=t.onSwatchHover,m=t.first,c=t.last,i=t.active,h=de({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:Lh(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:m,last:c,active:i,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return k.createElement(Cr,{color:n,style:h.color,onClick:l,onHover:A,focusStyle:{boxShadow:"0 0 4px "+n}},k.createElement("div",{style:h.check},k.createElement(nL,null)))},iL=function(t){var n=t.onClick,r=t.onSwatchHover,l=t.group,A=t.active,m=de({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return k.createElement("div",{style:m.group},yr(l,function(c,i){return k.createElement(rL,{key:c,color:c,active:c.toLowerCase()===A,first:i===0,last:i===l.length-1,onClick:n,onSwatchHover:r})}))},Jh=function(t){var n=t.width,r=t.height,l=t.onChange,A=t.onSwatchHover,m=t.colors,c=t.hex,i=t.styles,h=i===void 0?{}:i,d=t.className,a=d===void 0?"":d,o=de(pt({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},h)),s=function(g,f){return l({hex:g,source:"hex"},f)};return k.createElement("div",{style:o.picker,className:"swatches-picker "+a},k.createElement(Ha,null,k.createElement("div",{style:o.overflow},k.createElement("div",{style:o.body},yr(m,function(u){return k.createElement(iL,{key:u.toString(),group:u,active:c,onClick:s,onSwatchHover:A})}),k.createElement("div",{style:o.clear})))))};Jh.propTypes={width:ae.exports.oneOfType([ae.exports.string,ae.exports.number]),height:ae.exports.oneOfType([ae.exports.string,ae.exports.number]),colors:ae.exports.arrayOf(ae.exports.arrayOf(ae.exports.string)),styles:ae.exports.object};Jh.defaultProps={width:320,height:240,colors:[[Br[900],Br[700],Br[500],Br[300],Br[100]],[xr[900],xr[700],xr[500],xr[300],xr[100]],[Sr[900],Sr[700],Sr[500],Sr[300],Sr[100]],[br[900],br[700],br[500],br[300],br[100]],[_r[900],_r[700],_r[500],_r[300],_r[100]],[Qr[900],Qr[700],Qr[500],Qr[300],Qr[100]],[kr[900],kr[700],kr[500],kr[300],kr[100]],[Tr[900],Tr[700],Tr[500],Tr[300],Tr[100]],[Dr[900],Dr[700],Dr[500],Dr[300],Dr[100]],["#194D33",Ji[700],Ji[500],Ji[300],Ji[100]],[Or[900],Or[700],Or[500],Or[300],Or[100]],[Fr[900],Fr[700],Fr[500],Fr[300],Fr[100]],[Mr[900],Mr[700],Mr[500],Mr[300],Mr[100]],[Pr[900],Pr[700],Pr[500],Pr[300],Pr[100]],[Lr[900],Lr[700],Lr[500],Lr[300],Lr[100]],[Rr[900],Rr[700],Rr[500],Rr[300],Rr[100]],[Nr[900],Nr[700],Nr[500],Nr[300],Nr[100]],[Gr[900],Gr[700],Gr[500],Gr[300],Gr[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};vt(Jh);var Kh=function(t){var n=t.onChange,r=t.onSwatchHover,l=t.hex,A=t.colors,m=t.width,c=t.triangle,i=t.styles,h=i===void 0?{}:i,d=t.className,a=d===void 0?"":d,o=de(pt({default:{card:{width:m,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},h),{"hide-triangle":c==="hide","top-left-triangle":c==="top-left","top-right-triangle":c==="top-right"}),s=function(g,f){Wn(g)&&n({hex:g,source:"hex"},f)};return k.createElement("div",{style:o.card,className:"twitter-picker "+a},k.createElement("div",{style:o.triangleShadow}),k.createElement("div",{style:o.triangle}),k.createElement("div",{style:o.body},yr(A,function(u,g){return k.createElement(Cr,{key:g,color:u,hex:u,style:o.swatch,onClick:s,onHover:r,focusStyle:{boxShadow:"0 0 4px "+u}})}),k.createElement("div",{style:o.hash},"#"),k.createElement(ye,{label:null,style:{input:o.input},value:l.replace("#",""),onChange:s}),k.createElement("div",{style:o.clear})))};Kh.propTypes={width:ae.exports.oneOfType([ae.exports.string,ae.exports.number]),triangle:ae.exports.oneOf(["hide","top-left","top-right"]),colors:ae.exports.arrayOf(ae.exports.string),styles:ae.exports.object};Kh.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};vt(Kh);var qh=function(t){var n=de({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(t.hsl.h)+", "+Math.round(t.hsl.s*100)+"%, "+Math.round(t.hsl.l*100)+"%)"}}});return k.createElement("div",{style:n.picker})};qh.propTypes={hsl:ae.exports.shape({h:ae.exports.number,s:ae.exports.number,l:ae.exports.number,a:ae.exports.number})};qh.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Zh=function(t){var n=de({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(t.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return k.createElement("div",{style:n.picker})};Zh.propTypes={hsl:ae.exports.shape({h:ae.exports.number,s:ae.exports.number,l:ae.exports.number,a:ae.exports.number})};Zh.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var aL=function(t){var n=t.onChange,r=t.rgb,l=t.hsl,A=t.hex,m=t.hsv,c=function(s,u){if(s.hex)Wn(s.hex)&&n({hex:s.hex,source:"hex"},u);else if(s.rgb){var g=s.rgb.split(",");Ll(s.rgb,"rgb")&&n({r:g[0],g:g[1],b:g[2],a:1,source:"rgb"},u)}else if(s.hsv){var f=s.hsv.split(",");Ll(s.hsv,"hsv")&&(f[2]=f[2].replace("%",""),f[1]=f[1].replace("%",""),f[0]=f[0].replace("°",""),f[1]==1?f[1]=.01:f[2]==1&&(f[2]=.01),n({h:Number(f[0]),s:Number(f[1]),v:Number(f[2]),source:"hsv"},u))}else if(s.hsl){var p=s.hsl.split(",");Ll(s.hsl,"hsl")&&(p[2]=p[2].replace("%",""),p[1]=p[1].replace("%",""),p[0]=p[0].replace("°",""),a[1]==1?a[1]=.01:a[2]==1&&(a[2]=.01),n({h:Number(p[0]),s:Number(p[1]),v:Number(p[2]),source:"hsl"},u))}},i=de({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),h=r.r+", "+r.g+", "+r.b,d=Math.round(l.h)+"°, "+Math.round(l.s*100)+"%, "+Math.round(l.l*100)+"%",a=Math.round(m.h)+"°, "+Math.round(m.s*100)+"%, "+Math.round(m.v*100)+"%";return k.createElement("div",{style:i.wrap,className:"flexbox-fix"},k.createElement("div",{style:i.fields},k.createElement("div",{style:i.double},k.createElement(ye,{style:{input:i.input,label:i.label},label:"hex",value:A,onChange:c})),k.createElement("div",{style:i.column},k.createElement("div",{style:i.single},k.createElement(ye,{style:{input:i.input2,label:i.label2},label:"rgb",value:h,onChange:c})),k.createElement("div",{style:i.single},k.createElement(ye,{style:{input:i.input2,label:i.label2},label:"hsv",value:a,onChange:c})),k.createElement("div",{style:i.single},k.createElement(ye,{style:{input:i.input2,label:i.label2},label:"hsl",value:d,onChange:c})))))},ef=function(t){var n=t.width,r=t.onChange,l=t.rgb,A=t.hsl,m=t.hsv,c=t.hex,i=t.header,h=t.styles,d=h===void 0?{}:h,a=t.className,o=a===void 0?"":a,s=de(pt({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+l.r+", "+l.g+", "+l.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},d));return k.createElement("div",{style:s.picker,className:"google-picker "+o},k.createElement("div",{style:s.head},i),k.createElement("div",{style:s.swatch}),k.createElement("div",{style:s.saturation},k.createElement(Ho,{hsl:A,hsv:m,pointer:qh,onChange:r})),k.createElement("div",{style:s.body},k.createElement("div",{style:s.controls,className:"flexbox-fix"},k.createElement("div",{style:s.hue},k.createElement(Qi,{style:s.Hue,hsl:A,radius:"4px",pointer:Zh,onChange:r}))),k.createElement(aL,{rgb:l,hsl:A,hex:c,hsv:m,onChange:r})))};ef.propTypes={width:ae.exports.oneOfType([ae.exports.string,ae.exports.number]),styles:ae.exports.object,header:ae.exports.string};ef.defaultProps={width:652,styles:{},header:"Color picker"};vt(ef);function su({item:e}){const{name:t,value:n,handler:r}=e,[l,A]=K.exports.useState(n),[m,c]=K.exports.useState(!1),i=d=>{const{r:a,g:o,b:s,a:u}=d.rgb,g=`rgba(${a}, ${o}, ${s}, ${u})`;r(g)},h=d=>{if(!m){const a=()=>{c(!1),window.removeEventListener("click",a)};setTimeout(()=>{window.addEventListener("click",a)})}c(!m)};return K.exports.useEffect(()=>{A(n)},[n]),pe("div",{className:v2.color,children:[U("div",{className:"name",children:t}),U("div",{className:"color-bar-wrapper",onClick:h,children:U("div",{className:"color-bar",style:{backgroundColor:l}})}),U("div",{className:"picker-wrapper",onClick:d=>d.stopPropagation(),children:m&&U(JP,{onChange:i,color:l})})]})}const sL={"icon-bar":"_icon-bar_1vdkp_1"};function oL({item:e}){const{name:t,value:n,iconTypes:r,labels:l,handler:A}=e,m=c=>{A(c)};return pe("div",{className:sL["icon-bar"],children:[U("div",{className:"name",children:t}),U("div",{className:"icon-list",children:r.map((c,i)=>U("div",{className:zt("icon-wrapper",n[i]&&"icon-active"),onClick:()=>m(c),children:U(Fc,{text:l[i],children:U(Dt,{type:c})})},c))})]})}const lL="_select_zpj30_1",cL={select:lL};function uL({item:e}){const{name:t,value:n,handler:r,options:l}=e,[A,m]=K.exports.useState(n),c=i=>{r&&r(i)};return K.exports.useEffect(()=>{m(n)},[n]),pe("div",{className:cL.select,children:[U("div",{className:"name",children:t}),U("div",{className:"com-select",children:U(o1,{options:l,onChange:c,value:A})})]})}function hL(){const[e,t]=K.exports.useState(null);return K.exports.useLayoutEffect(()=>{const n=()=>{if(!ce.current)return;const r=ce.current.getSelected();if(r.length>=2){t(null);return}const A=(r[0]||ce.current).getFormObject();t(A)};return n(),at.on("selection-change",n),at.on("update-config",n),()=>{at.off("selection-change",n),at.off("update-config",n)}},[]),pe("div",{className:o2.attr,children:[U("div",{className:"title",children:e?e.name:"组合"}),U("div",{className:"divider"}),e===null&&U("div",{className:"empty",children:"组合暂不支持编辑"}),e&&e.items.map(n=>n.type==="double-input"?U(Y0,{item:n},n.id):n.type==="upload-image"?U(u2,{item:n},n.id):n.type==="range"?U(zc,{item:n},n.id):n.type==="textarea"?U(g2,{item:n},n.id):n.type==="icon-bar"?U(oL,{item:n},n.id):n.type==="color"?U(su,{item:n},n.id):n.type==="button"?U(nn,{style:{width:263,margin:"16px 0 0 16px"},onClick:n.handler,children:n.name},n.id):n.type==="select"?U(uL,{item:n},n.id):null)]})}const fL="_material_23e1r_1",dL={material:fL};function AL(){const[e,t]=K.exports.useState(!1),n=l=>{const A=l.target.files&&l.target.files[0];if(A===null)return;l.target.value="";const m=new FileReader;m.readAsDataURL(A),m.onload=c=>{const i=c.target.result;r(i)}},r=async l=>{if(e)return;const A=ce.current;if(!A)return;t(!0);const m=await Ma.create({imageUrl:l});A.add(m),t(!1)};return pe("div",{className:dL.material,children:[pe(nn,{style:{width:"100%"},loading:e,children:["添加本地图片",U("input",{className:"hide-input",type:"file",accept:"image/*",onChange:n})]}),U("div",{className:"divider"}),U(_o,{type:"material"})]})}const gL="_text_auhaz_1",pL={text:gL};function vL(){const[e,t]=K.exports.useState(!1),n=async()=>{if(e)return;const r=ce.current;if(!r)return;t(!0);const l=await to.create();r.add(l),t(!1)};return pe("div",{className:pL.text,children:[U(nn,{style:{width:"100%"},onClick:n,loading:e,children:"添加文本"}),U("div",{className:"divider"}),U(_o,{type:"text",showDropdown:!1,showSearch:!1})]})}const mL="_my_19yym_1",CL={my:mL},yL=[{id:"created",text:"文件库"},{id:"favorite",text:"收藏"},{id:"shared",text:"分享"}],EL=[{id:"material",text:"素材"},{id:"template",text:"模板"}];function wL(){const e=K.exports.useRef({created:[],shared:[],favorite:[]}),[t,n]=K.exports.useState([]),[r,l]=K.exports.useState("created"),[A,m]=K.exports.useState("material"),c=u=>{l(u.id)},i=u=>{m(u)},h=(u,g)=>{u.text==="编辑"||(u.text==="收藏"?d():u.text==="分享"?a():u.text==="删除"&&o())},d=async u=>{},a=async u=>{},o=async u=>{},s=()=>{const u=e.current[r];n(u.filter(g=>g.type===A))};return K.exports.useEffect(s,[r,A]),pe("div",{className:CL.my,children:[U(A1,{tabs:yL,onChange:c}),U("div",{className:"types",children:EL.map(u=>U("div",{className:zt("type",A===u.id&&"type-selected"),onClick:()=>i(u.id),children:u.text},u.id))}),t.length>0&&U(_o,{type:"custom",showSearch:!1,items:[{title:"",hasMore:!1,items:t}],onDropdownItemClick:h,dropdownListGenerator:u=>[{icon:"icon-edit",text:"编辑",checked:!1},{icon:"icon-heart-fill",text:"收藏",checked:u.isFav,hide:r==="shared"},{icon:"icon-share",text:"分享",checked:u.isShared,hide:r==="favorite"},{icon:"icon-delete",text:"删除",checked:!1,hide:r!=="created"}]})]})}const IL="_shape_3s4s4_1",BL={shape:IL};function xL(){const[e,t]=K.exports.useState(!1),[n,r]=K.exports.useState("rgba(255,192,203,1)"),[l,A]=K.exports.useState(1),[m,c]=K.exports.useState(!1),[i,h]=K.exports.useState("rgba(56,209,236,1)"),[d,a]=K.exports.useState([10,10]),[o,s]=K.exports.useState(10),u=async()=>{const I=ce.current;if(!I)return;const S=await S0.create({});I.add(S)},g=I=>{const S=ce.current;S&&(I&&en.show("按住 Shift 键可画出直线哦~"),S.instance.isDrawingMode=I,S.instance.freeDrawingBrush.color=n,t(I))},f=I=>{const S=ce.current;S&&(S.instance.freeDrawingBrush.width=I,A(I))},p=I=>{const S=ce.current;S&&(S.instance.freeDrawingBrush.color=I,r(I))},v=I=>{const S=ce.current;S&&(S.instance.freeDrawingBrush.shadow.color=I,h(I))},C=I=>{const S=ce.current;S&&(c(I),I?S.instance.freeDrawingBrush.shadow=new Ne.fabric.Shadow({blur:o,offsetX:d[0],offsetY:d[1],affectStroke:!0,color:i}):S.instance.freeDrawingBrush.shadow=null)},w=[{id:"width",type:"range",name:"画笔宽度",value:l,max:40,handler:f},{id:"color",type:"color",name:"画笔颜色",value:n,handler:p},{id:"shadowColor",type:"color",name:"阴影颜色",value:i,handler:v},{id:"offset",type:"double-input",name:"阴影偏移",label:["X","Y"],value:d,handler:(I,S)=>{const D=ce.current;D&&(D.instance.freeDrawingBrush.shadow.offsetX=I,D.instance.freeDrawingBrush.shadow.offsetY=S,a([I,S]))}},{id:"blur",type:"range",name:"阴影模糊度",value:o,max:80,handler:I=>{const S=ce.current;S&&(S.instance.freeDrawingBrush.shadow.blur=I,s(I))}}];return K.exports.useEffect(()=>{const I=ce.current;if(!I)return;r(I.instance.freeDrawingBrush.color),A(I.instance.freeDrawingBrush.width);const S=Boolean(I.instance.freeDrawingBrush.shadow);return c(S),S&&(h(I.instance.freeDrawingBrush.shadow.color),a([I.instance.freeDrawingBrush.shadow.offsetX,I.instance.freeDrawingBrush.shadow.offsetY]),s(I.instance.freeDrawingBrush.shadow.blur)),()=>{I.instance.isDrawingMode=!1}},[]),pe("div",{className:BL.shape,children:[U(nn,{onClick:u,style:{width:263,margin:"16px 0 0 16px"},children:"添加矩形"}),U("div",{className:"divider",style:{margin:"16px"}}),pe("div",{className:"switch-wrapper",children:["自由绘画模式",U(md,{checked:e,onChange:g})]}),e&&pe("div",{children:[U(zc,{item:w[0]}),U(su,{item:w[1]}),pe("div",{className:"switch-wrapper",children:["阴影开关",U(md,{checked:m,onChange:C})]}),m&&pe("div",{children:[U(su,{item:w[2]}),U(Y0,{item:w[3]}),U(zc,{item:w[4]})]})]})]})}const SL=[{id:"template",iconType:"icon-template",text:"模板"},{id:"material",iconType:"icon-material",text:"素材"},{id:"shape",iconType:"icon-shape",text:"图形"},{id:"text",iconType:"icon-text",text:"文本"},{id:"attr",iconType:"icon-attr",text:"属性"},{id:"my",iconType:"icon-my",text:"我的"}];function bL(){const[e,t]=K.exports.useState("template"),n=r=>{t(r.id)};return K.exports.useEffect(()=>{const r=()=>{!ce.current||ce.current.getSelected().length===0||t("attr")};return at.on("selection-change",r),()=>{at.off("selection-change",r)}},[]),pe("div",{className:bl.sidebar,children:[U("div",{className:bl.tabs,children:SL.map(r=>pe("div",{className:zt("tab",e===r.id&&"tab-active"),onClick:()=>n(r),children:[U(Dt,{className:"tab-icon",type:r.iconType}),U("div",{className:"tab-text",children:r.text})]},r.id))}),pe("div",{className:bl.main,children:[e==="template"&&U(a2,{}),e==="material"&&U(AL,{}),e==="text"&&U(vL,{}),e==="shape"&&U(xL,{}),e==="attr"&&U(hL,{}),e==="my"&&U(wL,{})]})]})}const _L="_app_l55t9_1",QL="_mask_l55t9_9",Nl={app:_L,mask:QL},lm={id:"",name:`新建画布${Date.now()}`,internal:!1,type:"template",tag:"推荐位",image:"",data:null},tf=K.exports.createContext(lm);function kL(){const[e,t]=K.exports.useState(!0),[n,r]=K.exports.useState(lm);return K.exports.useEffect(()=>{Hy(500).then(()=>{t(!1)});const l=A=>{if(!(!A.clipboardData||!ce.current))for(let m=0;m=0){const i=c.getAsFile();if(i===null)continue;const h=new FileReader;h.readAsDataURL(i),h.onload=async d=>{const a=d.target.result,o=await Ma.create({imageUrl:a});ce.current.add(o)};break}}};return document.addEventListener("paste",l),()=>{document.removeEventListener("paste",l)}},[]),e?U("div",{className:Nl.app,children:U("div",{className:Nl.mask,children:U(t1,{})})}):U(tf.Provider,{value:n,children:pe("div",{className:Nl.app,children:[U(Zw,{}),U(bL,{}),U(T1,{})]})})}window._iconfont_svg_string_3899988='',function(e){var n=(n=document.getElementsByTagName("script"))[n.length-1],t=n.getAttribute("data-injectcss"),n=n.getAttribute("data-disable-injectsvg");if(!n){var r,l,A,m,c,i=function(a,o){o.parentNode.insertBefore(a,o)};if(t&&!e.__iconfont__svg__cssinject__){e.__iconfont__svg__cssinject__=!0;try{document.write("")}catch{}}r=function(){var a,o=document.createElement("div");o.innerHTML=e._iconfont_svg_string_3899988,(o=o.getElementsByTagName("svg")[0])&&(o.setAttribute("aria-hidden","true"),o.style.position="absolute",o.style.width=0,o.style.height=0,o.style.overflow="hidden",o=o,(a=document.body).firstChild?i(o,a.firstChild):a.appendChild(o))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(r,0):(l=function(){document.removeEventListener("DOMContentLoaded",l,!1),r()},document.addEventListener("DOMContentLoaded",l,!1)):document.attachEvent&&(A=r,m=e.document,c=!1,d(),m.onreadystatechange=function(){m.readyState=="complete"&&(m.onreadystatechange=null,h())})}function h(){c||(c=!0,A())}function d(){try{m.documentElement.doScroll("left")}catch{return void setTimeout(d,50)}h()}}(window);ks.createRoot(document.getElementById("root")).render(U(kL,{}))});export default TL(); diff --git a/index.html b/index.html index d528ef9..a263311 100644 --- a/index.html +++ b/index.html @@ -5,8 +5,8 @@ TemplateView - - + +