diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e798e9..bc7c249 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. +## 4.5.0 - 2024.9.24 +### Added +* Assets are uploaded to the currently selected album + ## 4.4.0 - 2024.8.09 ### Added * Added query param to requests to filter to show only `Approved` images diff --git a/buildchain/src/js/canto-embed.js b/buildchain/src/js/canto-embed.js index aa285fc..58133a8 100644 --- a/buildchain/src/js/canto-embed.js +++ b/buildchain/src/js/canto-embed.js @@ -14,6 +14,7 @@ let _formatDistrict = ''; const MAX_CONTENT_REQUEST_ITEMS = 100; const MAX_ALBUM_REQUEST_ITEMS = 1000; const FILTER_BY_APPROVED = "&approval=Approved"; +let selectedAlbum = null; /* -----------------canto API start-------------------------------------------------------------*/ @@ -503,6 +504,9 @@ function addEventListener() { }) //treeview event .on("click", "#treeviewSection ul li", function (e) { + // Track active album for upload purposes + selectedAlbum = e.currentTarget.dataset.id; + e.cancelBubble = true; e.stopPropagation(); e.preventDefault(); @@ -960,7 +964,7 @@ function uploadFileToCanto(e) { formData.append("x-amz-meta-tag", ""); formData.append("x-amz-meta-scheme", ""); formData.append("x-amz-meta-id", ""); - formData.append("x-amz-meta-album_id", ""); + formData.append("x-amz-meta-album_id", selectedAlbum); formData.append("file", e.currentTarget.files[0]); let statusBar = parent.document.querySelector(".modal-status-bar"); diff --git a/composer.json b/composer.json index 4aa7d63..5b55eac 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "lsst-epo/canto-dam-assets", "description": "This Craft CMS plugin adds a Field Type with GraphQL support for the Canto Digital Asset Management (DAM) web system", "type": "craft-plugin", - "version": "4.4.0", + "version": "4.5.0", "license": "MIT", "require": { "php": ">=8.0.2", diff --git a/src/web/assets/dist/assets/app-BtXyNjpy.js b/src/web/assets/dist/assets/app-BtXyNjpy.js new file mode 100644 index 0000000..994e51a --- /dev/null +++ b/src/web/assets/dist/assets/app-BtXyNjpy.js @@ -0,0 +1,2 @@ + +//# sourceMappingURL=app-BtXyNjpy.js.map diff --git a/src/web/assets/dist/assets/app-BtXyNjpy.js.map b/src/web/assets/dist/assets/app-BtXyNjpy.js.map new file mode 100644 index 0000000..c76aac8 --- /dev/null +++ b/src/web/assets/dist/assets/app-BtXyNjpy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"app-BtXyNjpy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/src/web/assets/dist/assets/app-yfeoD6w3.css b/src/web/assets/dist/assets/app-Dq0P9rbE.css similarity index 98% rename from src/web/assets/dist/assets/app-yfeoD6w3.css rename to src/web/assets/dist/assets/app-Dq0P9rbE.css index 7c58eb1..50a82f0 100644 --- a/src/web/assets/dist/assets/app-yfeoD6w3.css +++ b/src/web/assets/dist/assets/app-Dq0P9rbE.css @@ -1 +1 @@ -#uploadBtnInvisible{display:none}#uploadBtn{background:linear-gradient(16deg,#078b8c,#a9da00);color:#fff;border-radius:17px;border-top:none;border-right:none;border-bottom:2px solid green;border-left:2px solid green;margin:0;padding:5px 16px;font-size:15px}#uploadBtn::-webkit-file-upload-button{visibility:hidden}#uploadBtn:before{content:"Upload File";color:#fff;display:inline-block;background:#078b8c!important;border-radius:17px;padding:5px 8px;outline:none;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;font-weight:700;font-size:15px}#uploadBtn:hover:before{border-color:#000}#uploadBtn:active{outline:0}#uploadBtn:active:before{background:linear-gradient(to bottom,#e3e3e3,#f9f9f9)}.header-section .insert-album-section{display:inline-block;float:none!important;margin-left:15px}.loading-message{z-index:110;color:#fff;text-align:center}body:not(.can-select-single) div#insertBtn,body:not(.can-select-single) .image-preview-modal .detail-box .insert-action-section .insert-text{display:none}body:not(.can-select-multiple) .body-section .single-image:hover .select-box,body:not(.can-select-multiple) .body-section .single-image:hover .select-icon-background{display:none}body:not(.can-select-album) div#insertAlbumWrapper{display:none}.canto-uc-subiframe{width:100%;height:100%}.modal-test{height:100%}.modal-status-bar{height:25px;background:linear-gradient(87deg,#078b8c,#fff 50%);margin:-5px 25px 0 0;padding-left:25px;color:#fff;display:none}.canto-asset-preview-stack{background:#f6f6f6;border:1px solid #ccc;margin-bottom:20px;box-shadow:0 0 #0000007f,0 3px 0 -2px #f6f6f6,0 3px 2px -2px #0006,0 7px 0 -4px #f6f6f6,0 7px 2px -4px #0006,0 11px 0 -6px #f6f6f6,0 11px 2px -6px #0006,0 15px 0 -8px #f6f6f6,0 15px 2px -8px #0006,0 19px 0 -10px #f6f6f6,0 19px 2px -10px #0006,0 23px 0 -12px #f6f6f6,0 23px 2px -12px #0006}.flex{display:flex}.hidden{display:none}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@font-face{font-family:icomoon_flight_01;src:url(./icomoon_flight_01-4QT36WYy.eot?xm1ff0);src:url(./icomoon_flight_01-4QT36WYy.eot?xm1ff0#iefix) format("embedded-opentype"),url(./icomoon_flight_01-rarigfHY.ttf?xm1ff0) format("truetype"),url(./icomoon_flight_01-c0u_u8bp.woff?xm1ff0) format("woff"),url(./icomoon_flight_01-BKNFFTxm.svg?xm1ff0#icomoon_flight_01) format("svg");font-weight:400;font-style:normal}[class^=icon-],[class*=" icon-"]{font-family:icomoon_flight_01!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-capture:before{content:""}.icon-help:before{content:""}.icon-icn_flight_box_folder_01:before{content:""}.icon-icn_flight_dropbox_folder_01:before{content:""}.icon-icn_flight_googleDrive_folder_01:before{content:""}.icon-dropbox_folder_open:before{content:""}.icon-dropbox_folder:before{content:""}.icon-geo_data:before{content:""}.icon-timeline:before{content:""}.icon-dashboard:before{content:""}.icon-Coordinate:before{content:""}.icon-dimensions:before{content:""}.icon-fullscreen_01:before{content:""}.icon-more01:before{content:""}.icon-cold_restore:before{content:""}.icon-cold_request:before{content:""}.icon-cold_move:before{content:""}.icon-offline:before{content:""}.icon-googleDrive_folder:before{content:""}.icon-googleDrive_folder_open:before{content:""}.icon-library:before{content:""}.icon-triangle-down:before{content:""}.icon-triangle-up:before{content:""}.icon-box_folder:before{content:"}"}.icon-box_folder_open:before{content:"~"}.icon-copy1:before{content:"|"}.icon-copy:before{content:"{"}.icon-add_1:before{content:"`"}.icon-subtract_1:before{content:"a"}.icon-closed2:before{content:"_"}.icon-warning:before{content:"^"}.icon-pdf_preview:before{content:"M"}.icon-rotate_left:before{content:"*"}.icon-rotate_right:before{content:"-"}.icon-move:before{content:"0"}.icon-resize:before{content:":"}.icon-resize2:before{content:">"}.icon-keyphoto:before{content:"?"}.icon-icn_delete:before{content:"&"}.icon-icn_remove:before{content:"'"}.icon-crop:before{content:""}.icon-more:before{content:'"'}.icon-edit:before{content:"#"}.icon-add:before{content:"!"}.icon-icn_expand_02:before{content:""}.icon-icn_linkedin_01:before{content:""}.icon-icn_upload_cloud_01:before{content:""}.icon-icn_checkbox_checked_02:before{content:""}.icon-icn_grid_filled_01:before{content:"I"}.icon-icn_flight_logo_01:before{content:""}.icon-icn_default_user_01:before{content:""}.icon-box_logo_01:before{content:""}.icon-icn_tree4:before{content:""}.icon-icn_tree3:before{content:""}.icon-icn_tree2:before{content:""}.icon-icn_tree:before{content:""}.icon-icn_upload4:before{content:""}.icon-icn_box_filled:before{content:""}.icon-icn_upload3:before{content:""}.icon-icn_dropbox_02:before{content:""}.icon-icn_bell_02:before{content:""}.icon-icn_star_01:before{content:""}.icon-icn_disk_01:before{content:""}.icon-icn_close_x_01:before{content:""}.icon-icn_close_circle_x_01:before{content:""}.icon-icn_checkmark_circle_01:before{content:""}.icon-icn_eye_01:before{content:""}.icon-icn_flight_arrow_up_01:before{content:""}.icon-icn_flight_arrow_down_01:before{content:""}.icon-icn_flight_sort_descend_01:before{content:""}.icon-icn_reload_alt_01:before{content:""}.icon-icn_checkbox_checked_01:before{content:";"}.icon-icn_pencil_01:before{content:"·"}.icon-icn_flight_arrow_left_01:before{content:"≤"}.icon-icn_flight_arrow_right_01:before{content:"≥"}.icon-icn_flight_album_assign_01:before{content:"Å"}.icon-icn_flight_folder_open3{font-family:icomoon!important}.icon-icn_flight_folder_open3:before{content:""}.icon-icn_flight_folder_01{font-family:icomoon!important}.icon-icn_flight_folder_01:before{content:""}.icon-icn_reload_01:before{content:"‰"}.icon-icn_flight_plus_sm_thick_01:before{content:"≠"}.icon-icn_flight_plus_sm_01:before{content:"±"}.icon-icn_flight_power:before{content:"\\"}.icon-icn_checkbox_checked_013:before{content:"<"}.icon-icn_flight_preso:before{content:"."}.icon-cal:before{content:"/"}.icon-icn_flight_sort_01:before{content:"="}.icon-icn_flight_info_01:before{content:","}.icon-icn_flight_preso_01:before{content:")"}.icon-icn_portal_01:before{content:"("}.icon-icn_flight_plus_01:before{content:"]"}.icon-icn_album_01:before{content:"["}.icon-Plus-02:before{content:"¡"}.icon-image:before{content:"b"}.icon-image2:before{content:"c"}.icon-music:before{content:"d"}.icon-film:before{content:"e"}.icon-camera:before{content:"f"}.icon-bullhorn:before{content:""}.icon-book:before{content:"g"}.icon-books:before{content:"h"}.icon-file:before{content:"i"}.icon-file2:before{content:"j"}.icon-file3:before{content:"k"}.icon-file4:before{content:"l"}.icon-stack:before{content:"m"}.icon-folder:before{content:"n"}.icon-folder-open:before{content:"o"}.icon-tag:before{content:""}.icon-notebook:before{content:"p"}.icon-envelope:before{content:"q"}.icon-history:before{content:""}.icon-bell:before{content:"r"}.icon-calendar:before{content:"s"}.icon-screen:before{content:"t"}.icon-laptop:before{content:"u"}.icon-drawer:before{content:"v"}.icon-upload:before{content:"x"}.icon-user:before{content:"y"}.icon-users:before{content:"z"}.icon-user2:before{content:"Z"}.icon-spinner:before{content:"Í"}.icon-search:before{content:"S"}.icon-zoomin:before{content:"A"}.icon-zoomout:before{content:"B"}.icon-key:before{content:""}.icon-lock:before{content:""}.icon-unlocked:before{content:""}.icon-settings:before{content:"ˇ"}.icon-cog:before{content:"C"}.icon-pie:before{content:"D"}.icon-bars:before{content:"E"}.icon-remove:before{content:"F"}.icon-remove2:before{content:"G"}.icon-briefcase:before{content:"H"}.icon-list:before{content:"L"}.icon-menu:before{content:"J"}.icon-tree:before{content:"K"}.icon-download2:before{content:""}.icon-upload2:before{content:""}.icon-flag:before{content:"N"}.icon-star:before{content:"O"}.icon-star2:before{content:"P"}.icon-heart:before{content:"Q"}.icon-heart2:before{content:"R"}.icon-thumbs-up:before{content:"¨"}.icon-info:before{content:"ˆ"}.icon-close:before{content:"ç"}.icon-checkmark:before{content:"T"}.icon-checkmark2:before{content:"U"}.icon-minus:before{content:"µ"}.icon-plus:before{content:"+"}.icon-enter:before{content:"V"}.icon-exit:before{content:"W"}.icon-stop:before{content:""}.icon-arrow-down:before{content:"å"}.icon-checkbox-checked:before{content:"X"}.icon-checkbox-unchecked:before{content:"Y"}.icon-checkbox-partial:before{content:"1"}.icon-radio-checked:before{content:"2"}.icon-radio-unchecked:before{content:"3"}.icon-filter:before{content:"4"}.icon-filter2:before{content:"5"}.icon-table:before{content:"6"}.icon-paragraph-justify:before{content:"7"}.icon-share:before{content:"8"}.icon-mail:before{content:"9"}.icon-googleplus:before{content:""}.icon-googleplus2:before{content:""}.icon-googleplus3:before{content:""}.icon-facebook:before{content:""}.icon-facebook2:before{content:""}.icon-facebook3:before{content:""}.icon-twitter:before{content:""}.icon-twitter2:before{content:""}.icon-twitter3:before{content:""}.icon-wordpress:before{content:""}.icon-wordpress2:before{content:""}.icon-linkedin:before{content:""}.icon-pinterest:before{content:""}.icon-pinterest2:before{content:""}.icon-file-pdf:before{content:"@"}.icon-file-word:before{content:"$"}.icon-file-excel:before{content:"%"}.icon-arrow-up-right:before{content:""}.icon-arrow-right:before{content:""}.icon-arrow-left:before{content:""}.icon-arrow-right2:before{content:""}.icon-arrow-left2:before{content:""}.icon-weather-snow:before{content:""}.icon-uniF16B:before{content:""}.icon-download:before{content:"w"}@font-face{font-family:icomoon;src:url(./icomoon-IPbEP_qL.eot?n9woxf);src:url(./icomoon-IPbEP_qL.eot?n9woxf#iefix) format("embedded-opentype"),url(./icomoon-A_DLqJhJ.ttf?n9woxf) format("truetype"),url(./icomoon-k7ZyzFEo.woff?n9woxf) format("woff"),url(./icomoon-oeb9auqQ.svg?n9woxf#icomoon) format("svg");font-weight:400;font-style:normal}[class^=icon-s-],[class*=" icon-s-"]{font-family:icomoon!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-s-folder-01:before{content:""}.icon-s-more-24:before{content:""}.icon-s-Treemenu-24:before{content:""}.icon-s-arrow-24:before{content:""}.icon-s-profile-24:before{content:""}.icon-s-settings-24:before{content:""}.icon-s-advanceduploader-24:before{content:""}.icon-s-mycollections-24:before{content:""}.icon-s-logoout-24:before{content:""}.icon-s-help-24:before{content:""}.icon-s-gotoportal-24:before{content:""}.icon-s-aboutus-24:before{content:""}.icon-s-TypeASC-20:before{content:""}.icon-s-TypeDESC-20:before{content:""}.icon-s-DateASC-20:before{content:""}.icon-s-DateDESC-20:before{content:""}.icon-s-NameASC:before{content:""}.icon-s-NameDESC:before{content:""}.icon-s-Workspace-20:before{content:""}.icon-s-MasonryGridView-20:before{content:""}.icon-s-Edit-20:before{content:""}.icon-s-Search-20:before{content:""}.icon-s-ThumbnailView-20:before{content:""}.icon-s-GEOView-20:before{content:""}.icon-s-ListView-20:before{content:""}.icon-s-Filter-20:before{content:""}.icon-s-Date-20:before{content:""}.icon-s-Comment-22:before{content:""}.icon-s-Delete-22:before{content:""}.icon-s-UnrelateFile-22:before{content:""}.icon-s-RelateFile-22:before{content:""}.icon-s-Portal-22:before{content:""}.icon-s-AllFiles-32:before{content:""}.icon-s-Audio-32:before{content:""}.icon-s-Documents-32:before{content:""}.icon-s-Images-32:before{content:""}.icon-s-Others-32:before{content:""}.icon-s-Presentations-32:before{content:""}.icon-s-Videos-32:before{content:""}.icon-s-PageDown-32:before{content:""}.icon-s-PageUp-32:before{content:""}.icon-s-Add_Section-32:before{content:""}.icon-s-Portal-32:before{content:""}.icon-s-Error-24:before{content:""}.icon-s-Approval-56:before{content:""}.icon-s-SmartTags-56:before{content:""}.icon-s-Uploadicon-56:before{content:""}.icon-s-importicon-56:before{content:""}.icon-s-Workspace-56:before{content:""}.icon-s-Slack-56:before{content:""}.icon-s-Arrow001-56:before{content:""}.icon-s-Arrow002-56:before{content:""}.icon-s-SelfRegistration-56:before{content:""}.icon-s-InfoPage-56:before{content:""}.icon-s-NewUploadLink-56:before{content:""}.icon-s-UploadLinks-56:before{content:""}.icon-s-Integrations-56:before{content:""}.icon-s-CustomFields-56:before{content:""}.icon-s-Keywords-56:before{content:""}.icon-s-CrewSettings-56:before{content:""}.icon-s-Portal-56:before{content:""}.icon-s-Metadata-56:before{content:""}.icon-s-NewPortal-56:before{content:""}.icon-s-Account-56:before{content:""}.icon-s-Branding-56:before{content:""}.icon-s-PassengerSettings-56:before{content:""}.icon-s-box-56:before{content:""}.icon-s-DigitalRights-56:before{content:""}.icon-s-Dropbox-56:before{content:""}.icon-s-DuplicateCheck-56:before{content:""}.icon-s-NewUser-56:before{content:""}.icon-s-Reports-56:before{content:""}.icon-s-UsersAccounts-56:before{content:""}.icon-s-Workflow-56:before{content:""}.icon-s-Google-56:before{content:""}.icon-s-Defaults-56:before{content:""}.icon-s-Groups-56:before{content:""}.icon-s-lock_16:before{content:""}.icon-s-notlock_16:before{content:""}.icon-s-Type-16:before{content:""}.icon-s-Name-16:before{content:""}.icon-s-Custom-16:before{content:""}.icon-s-Date-16:before{content:""}.icon-s-Warning-16:before{content:""}.icon-canto-eye-16:before{content:""}.icon-s-Unlink_16:before{content:""}.icon-s-Search_16:before{content:""}.icon-s-Refresh_16:before{content:""}.icon-s-RadioButton2_16:before{content:""}.icon-s-RadioButton1_16:before{content:""}.icon-s-UnselectedCheck_32:before{content:""}.icon-s-Ok2_32:before{content:""}.icon-s-Ok1_16:before{content:""}.icon-s-Edit_16:before{content:""}.icon-s-Dropdown_16:before{content:""}.icon-s-Delete_16:before{content:""}.icon-s-Date_16:before{content:""}.icon-s-ClosePopup_16:before{content:""}.icon-s-Checkbox2_16:before{content:""}.icon-s-Checkbox1_16:before{content:""}.icon-s-Cancel_16:before{content:""}.icon-s-BackButton_28:before{content:""}.icon-s-Arrow3_16:before{content:""}.icon-s-Arrow2_16:before{content:""}.icon-s-Arrow1_16:before{content:""}.icon-s-PasswordPolicy-56:before{content:""}.icon-s-dashboard_24:before{content:""}.icon-s-Album_locked-20px:before{content:""}.icon-s-Album-20px:before{content:""}.icon-s-Folder_locked-20px:before{content:""}.icon-s-Folder_open_locked-20px:before{content:""}.icon-s-Folder_open-20px:before{content:""}.icon-s-closeicon-16px:before{content:""}.icon-s-refreshicon-16px:before{content:""}.icon-s-RequestAccessUser-16:before{content:""}.icon-s-LandingPageTempl08-32:before{content:""}.icon-s-LandingPageTempl07-32:before{content:""}.icon-s-LandingPageTempl06-32:before{content:""}.icon-s-LandingPageTempl05-32:before{content:""}.icon-s-LandingPageTempl04-32:before{content:""}.icon-s-LandingPageTempl03-32:before{content:""}.icon-s-LandingPageTempl02-32:before{content:""}.icon-s-LandingPageTempl01-32:before{content:""}.icon-s-db-32:before{content:"";color:#60acec}.icon-s-box-32:before{content:"";color:#307abb}.icon-s-twitter-32:before{content:"";color:#1ab2e8}.icon-s-youtube-32:before{content:"";color:#c8312b}.icon-s-vimeo-32:before{content:"";color:#30b9eb}.icon-s-slack-32:before{content:"";color:#77d4b6}.icon-s-mail-32:before{content:"";color:#566ed6}.icon-s-googledrive-32:before{content:"";color:#029d54}.icon-s-googleanalytics-32:before{content:""}.icon-s-facebook-32:before{content:"";color:#6678c5}.icon-s-pinterest-32:before{content:"";color:#df4a3e}.icon-s-arrow_circle_down-62:before{content:""}.icon-s-Email-56:before{content:""}.icon-s-hamburger-20:before{content:""}.icon-s-dagger_solid-20:before{content:""}.icon-s-dagger-20:before{content:""}.icon-s-align_center-16:before{content:"";color:#8a8a8a}.icon-s-align_left-16:before{content:""}.icon-s-align_right-16:before{content:""}.icon-s-bold-16:before{content:""}.icon-s-calendar-16:before{content:""}.icon-s-italics-16:before{content:""}.icon-s-pencil-16:before{content:""}.icon-s-portal-16:before{content:""}.icon-s-canto-eyeno-16:before{content:""}.icon-s-filter-16:before{content:""}.icon-s-sort-16:before{content:""}.icon-s-undo-16:before{content:""}.icon-s-help-16:before{content:""}.icon-s-layout01-32:before{content:""}.icon-s-layout02-32:before{content:""}.icon-s-layout03-32:before{content:""}.icon-s-layout04-32:before{content:""}.icon-s-layout05-32:before{content:""}.icon-s-layout06-32:before{content:""}.icon-s-layout07-32:before{content:""}.icon-s-layout08-32:before{content:""}.icon-s-layout09-32:before{content:""}.icon-s-layout10-32:before{content:""}.icon-s-layout11-32:before{content:""}.icon-s-layout12-32:before{content:""}.icon-s-layout13-32:before{content:""}.icon-s-layout14-32:before{content:""}.icon-s-TextColor-16:before{content:""}.icon-s-Clone-16:before{content:""}.icon-s-save-16:before{content:""}.icon-s-Portal_Private-20:before{content:""}.icon-s-Portal_Public-20:before{content:""}.icon-s-Portal_Common-20:before{content:""}.icon-s-Keyword-16:before{content:""}.icon-s-single_workspace-20:before{content:""}.icon-s-workspaces-20:before{content:""}.icon-s-Fullscreen:before{content:""}.icon-s-indesignPackage:before{content:""}.icon-s-documentPackage:before{content:""}.icon-s-comments:before{content:""}.icon-s-map:before{content:""}.canto-pickup-img-btn{height:30px;line-height:26px;margin:15px;padding:0 15px;font-size:15px;background-color:#ff9800;font-weight:700;border:0;display:block}.canto-pickup-img-btn:hover{background-color:#c77b09}.canto-uc-frame{position:fixed;width:90%;height:90%;margin:auto;top:5%;left:5%;background:#fff;border:0;box-shadow:0 0 5px #ccc;z-index:999}.canto-uc-frame .header{height:20px;padding:15px;background:#f5f5f5;border-bottom:1px solid #ddd}.canto-uc-frame .header .title{font-size:17px;font-weight:700}.canto-uc-frame .header .close-btn{position:absolute;right:20px;top:14px;font-size:23px;color:#000}.canto-uc-frame .header .close-btn:hover{cursor:pointer}.canto-uc-frame .canto-uc-subiframe{width:100%;position:relative;height:calc(100% - 50px);border:0;padding:0}.text-lowercase{text-transform:lowercase!important}.text-orange{color:#733!important}.text-orange:focus,.text-orange:hover{color:#733}.text-black{color:#000!important}.text-white{color:#fff!important}.text-grey{color:#444!important}body{font-family:sans-serif,Helvetica,Arial;font-size:14px;line-height:1.4286;color:#333;background-color:#fff;min-width:850px;overflow-x:hidden}.canto-body{height:100vh;width:100%;position:relative;overflow:hidden;z-index:1;margin:0}.header-section{height:50px;width:100%;position:relative;background-color:#f5f5f5;box-shadow:0 0 5px #0003}.header-section .library{display:inline-block;cursor:pointer}.header-section .library .treeview-icon{line-height:50px;margin-left:20px;position:relative;top:1px}.header-section .library .treeview-icon:before{margin-right:5px}.header-section .library .treeview-desc{font-size:15px;margin-left:0}.header-section .search-box{display:inline-block;margin-left:25px;width:200px;position:relative}.header-section .search-box input{width:170px;padding:2px 10px;border-radius:15px;border:1px solid #ccc;height:20px}.header-section .search-box span{position:absolute;right:0;top:0;color:#888;height:25px;width:32px;padding-top:7px;padding-left:10px;cursor:pointer}.header-section .filter-section{line-height:50px;margin-right:20px;position:relative;display:inline-block}.header-section .filter-section .type-font{font-size:25px;color:#000;position:relative;top:5px;cursor:pointer}.header-section .filter-section .type-font.current{color:#fff;border-radius:50%;background-color:#222}.header-section .filter-section .type-font:hover{border-radius:50%;background-color:#dedede}.header-section .filter-section .type-font:hover.current{color:#fff;border-radius:50%;background-color:#222}.header-section .selected-count-section{display:inline-block;margin-left:calc(50% - 100px)}.header-section .selected-action-section{display:inline-block;float:right;line-height:50px;margin-right:0}.header-section .selected-action-section .action-icon{font-size:20px;color:#555;margin-right:20px;position:relative;top:3px;cursor:pointer}.header-section .selected-action-section .action-icon:hover{border-radius:50%;color:#333}.header-section .selected-action-section .action-icon.all-selected{color:#111}.header-section .selected-action-section .action-icon.all-selected:hover{color:#000}.header-section .selected-action-section .action-btn{padding:4px 10px;width:54px;background:#555;line-height:50px;margin-top:20px;border-radius:15px;color:#ddd;margin-right:29px;vertical-align:top;cursor:pointer}.header-section .selected-action-section .action-btn:hover{background:#333}.header-section .logout-btn{z-index:3;height:50px;width:47px;background-color:#f5f5f5;border-radius:50%;display:block;cursor:pointer;border:1px solid #f1f1f1;float:right;text-align:center;margin-right:10px}.header-section .logout-btn span{font-size:21px;margin:auto;color:#555;position:relative;line-height:50px}.header-section .logout-btn:hover,.header-section .logout-btn:hover span{color:#333}.max-select-tips{position:fixed;top:50px;text-align:center;left:20%;z-index:100;background:#e89600;color:#fff;font-size:15px;display:none;width:calc(80% - 15px);line-height:35px;opacity:.85}.no-treeview{left:0!important;width:100%!important}.hidden{display:none!important}.tree-view-section{width:20%;border-right:1px solid #ddd;height:calc(100% - 50px);display:inline-block;position:relative;background-color:#f5f5f5;border-top:1px solid #ddd;overflow:scroll}.tree-view-section .tree-view{margin-top:10px}.tree-view-section .tree-view .logo{width:18px;position:relative;display:inline-block;top:5px;vertical-align:top}.tree-view-section .tree-view ul{list-style:none;padding-left:0;cursor:pointer}.tree-view-section .tree-view li{list-style:none;line-height:30px;padding-left:10px;margin-left:10px;position:relative;white-space:nowrap}.tree-view-section .tree-view li:before{content:"";border-left:1px solid #e0e0e0;height:100%;position:absolute;left:-1px}.tree-view-section .tree-view li:after{content:"";left:-1px;position:absolute;right:auto;border-top:1px solid #e0e0e0;height:20px;top:25px;width:15px}.tree-view-section .tree-view li:last-child:before{height:30px}.tree-view-section .tree-view li.selected,.tree-view-section .tree-view li.selected span{color:#ff9800}.tree-view-section .tree-view li.no-child{color:#aaa}.tree-view-section .tree-view li.no-child span{color:#aaa;font-style:italic;margin-left:1px}.tree-view-section .tree-view li .tree-whole-row{position:absolute;height:28px;width:100%;left:0;background-color:#f5f5f5;z-index:0}.tree-view-section .tree-view li .tree-whole-row:hover{background-color:#ddd}.tree-view-section .tree-view i{width:15px;height:20px;display:inline-block;font-size:18px;margin-right:5px;position:relative;top:2px}.tree-view-section .tree-view .folder-loading{width:18px;height:18px;position:relative;top:2px}.tree-view-section .tree-view a,.tree-view-section .tree-view span{color:#666;font-size:14px;z-index:2;position:relative}.tree-view-section .tree-view>ul{padding-left:0;border-left:none}.tree-view-section .tree-view>ul>li:before{border-left:none}.tree-view-section .tree-view>ul>li:after{border-top:none}.body-section{display:inline-block;vertical-align:top;width:80%;position:absolute;left:20%;font-size:0;height:calc(100% - 50px);overflow-y:scroll}.body-section .loading-more{position:fixed;bottom:0;width:calc(80% - 15px);height:33px;z-index:100;background:#bcbcbc;color:#000;text-align:center;font-size:15px;line-height:33px;display:none;left:20%;opacity:.95}.body-section .no-item{position:fixed;top:20%;width:80%;height:50px;z-index:100;color:#626262;display:block;text-align:center;font-size:15px;line-height:35px;font-weight:400}.body-section .image-section{padding:3px}.body-section .single-image{margin:1px;height:189px;width:189px;position:relative;display:inline-block;vertical-align:top;overflow:hidden}.body-section .single-image img{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;opacity:.9}.body-section .single-image .mask-layer{display:none;background-color:#3232324d;z-index:2;height:100%;width:100%;position:absolute;top:0;left:0;overflow:hidden}.body-section .single-image .single-image-name{position:absolute;width:100%;top:100%;background:#3232327f;color:#fff;font-size:12px;line-height:20px;padding:10px 0;text-align:center;z-index:99;word-break:break-all;white-space:pre-wrap}.body-section .single-image .select-box{display:none;position:absolute;top:10px;right:10px;color:#555;font-size:25px;z-index:5}.body-section .single-image .select-icon-background{display:none;background-color:#fff;box-shadow:0 0 6px #777;border-radius:100%;width:23px;height:23px;position:absolute;top:11px;right:11px;z-index:4}.body-section .single-image:hover img{opacity:1}.body-section .single-image:hover .mask-layer,.body-section .single-image:hover .select-box,.body-section .single-image:hover .select-icon-background,.body-section .single-image.selected .select-box,.body-section .single-image.selected .select-icon-background{display:block}.page-mask{z-index:99;position:fixed;width:100%;height:100%;top:0;left:0;background-color:#000c}.loading-icon{z-index:110;position:fixed;width:100%;height:100%;top:0;left:0;background-color:#000c}.loading-icon img{top:50%;left:50%;transform:translate(-50%) translateY(-50%);position:absolute}.loading-icon .loading-icon-circle{top:50%;left:50%;transform:translate(-50%) translateY(-50%);height:50px;width:50px;line-height:32px;position:relative;display:inline-block;overflow:hidden;white-space:nowrap}.loading-icon .loading-icon-circle .loading-icon-markup{animation:icon-spin 2s infinite linear}.loading-icon .loading-icon-circle .loading-icon-markup .icon-color{color:#fff}.view-image-modal{z-index:99;position:fixed;display:block;top:50%;left:50%;transform:translate(-50%) translateY(-50%);max-width:100%;max-height:100%}.view-image-modal .page-mask{z-index:100;position:fixed;width:100%;height:100%;top:0;left:0;background-color:#000c}.view-image-modal img{z-index:101;position:relative;max-width:100vw;max-height:100vh}.view-image-modal .close-btn{position:absolute;right:20px;top:20px;font-size:30px;width:30px;height:30px;color:#fff;z-index:102;cursor:pointer}.image-detail-modal{z-index:99;position:fixed;display:block;width:540px;height:320px;background-color:#fff;top:calc(50% - 150px);left:calc(50% - 250px)}.image-detail-modal .page-mask{z-index:100;position:fixed;width:100%;height:100%;top:0;left:0;background-color:#000c}.image-detail-modal .close-btn{position:absolute;color:#000;right:20px;top:20px;font-size:30px;width:30px;height:30px;z-index:102;cursor:pointer}.image-detail-modal .detail-section{position:relative;padding:20px;z-index:101;width:500px;height:350px;background-color:#fff}.image-detail-modal .detail-section .detail-title{font-size:20px;text-align:center;margin-bottom:10px;margin-top:15px}.image-detail-modal .detail-section .detail-li{line-height:30px}.image-detail-modal .detail-section .detail-li .title{width:200px;text-align:right;display:inline-block;font-size:15px;font-weight:700}.image-detail-modal .detail-section .detail-li .content{text-align:left;margin-left:5px;font-size:15px}.image-detail-modal .insert-btn{line-height:20px;border:1px solid #333;position:absolute;bottom:0;z-index:102;margin:auto;text-align:center;left:190px;padding:5px 10px;border-radius:20px;cursor:pointer}.image-detail-modal .insert-btn:hover{border:1px solid #006799;background-color:#006799;color:#fff}.load-more{position:relative;top:20px;display:block;height:20px;color:#828282;margin:auto;font-size:15px;text-align:center;cursor:pointer}.load-more span{font-family:sans-serif,Helvetica,Arial}.load-more:before{font-size:20px;position:relative;top:5px}.image-preview-modal{z-index:99;position:fixed;width:100%;height:100%;top:0;left:0;background-color:#000000e5;padding:20px;box-sizing:border-box}.image-preview-modal .close-btn{position:absolute;right:20px;top:30px;font-size:25px;color:#fff;cursor:pointer;z-index:99}.image-preview-modal .image-box{position:relative;width:calc(100% - 575px);height:100%}.image-preview-modal .image-box img{position:relative;max-width:100%;max-height:100%;margin:auto;left:50%;top:50%;transform:translate(-50%,-50%)}.image-preview-modal .detail-box{width:575px;top:0;position:absolute;right:0;box-sizing:border-box;height:90%;padding:20px 20px 20px 40px;background-color:#444}.image-preview-modal .detail-box .clear{clear:both}.image-preview-modal .detail-box .detail-list-cotnt{height:75%;overflow-y:auto;position:relative;overflow-x:hidden}.image-preview-modal .detail-box .image-name{font-size:18px;color:#fff;margin-top:15px;line-height:30px;margin-bottom:20px;width:calc(100% - 30px);display:block;position:relative;word-break:break-all}.image-preview-modal .detail-box .detail-item{font-size:12px;line-height:20px;color:#bbb;margin:5px 0}.image-preview-modal .detail-box .detail-item .title{font-weight:700}.image-preview-modal .detail-box .detail-item .more{display:none}.image-preview-modal .detail-box .detail-item.restrict-height .content{max-height:40px;overflow-y:hidden}.image-preview-modal .detail-box .detail-item.restrict-height .more{display:block;float:right;text-decoration:underline;cursor:pointer}.image-preview-modal .detail-box .insert-action-section{position:absolute;padding-bottom:20px;bottom:0;color:#ff9800;background-color:inherit;font-size:17px;width:calc(100% - 40px);box-sizing:border-box;line-height:50px}.image-preview-modal .detail-box .insert-action-section .insert-text{display:inline;color:#fff}.image-preview-modal .detail-box .insert-action-section .cancel-btn{display:inline;background-color:#666;padding:6px 15px;border-radius:15px;color:#fff;font-size:15px;margin-left:40px;cursor:pointer}.image-preview-modal .detail-box .insert-action-section .cancel-btn:hover{background-color:#555}.image-preview-modal .detail-box .insert-action-section .insert-btn{display:inline;background-color:#777;padding:6px 15px;border-radius:15px;color:#fff;font-size:15px;margin:10px;cursor:pointer}.image-preview-modal .detail-box .insert-action-section .insert-btn:hover{background-color:#666}.image-preview-modal .detail-box .insert-action-section .btn-group{float:right;margin-right:10px}.canto-pick-box{width:95%;background-color:#ff9800;padding:10px}.canto-pick-box .header{position:relative}.canto-pick-box .header .title{font-size:16px;font-weight:700;color:#fff}.canto-pick-box .header .close-btn{position:absolute;right:0;top:0;font-size:23px;color:#fff}.canto-pick-box .img-box{background-color:#fff;margin-top:10px;padding:10px}.canto-pick-box .btn-section{text-align:center}.canto-pick-box .btn-section button{height:30px;width:100px;line-height:26px;margin:15px;padding:0;font-size:15px;background-color:#ff9800;color:#fff;border:2px solid #fff;font-weight:700}.canto-pick-box .btn-section button:hover{background-color:#c77b09}.canto-preview-img{width:200px;height:200px;-o-object-fit:cover;object-fit:cover} +#uploadBtnInvisible{display:none}#uploadBtn{background:linear-gradient(16deg,#078b8c,#a9da00);color:#fff;border-radius:17px;border-top:none;border-right:none;border-bottom:2px solid green;border-left:2px solid green;margin:0;padding:5px 16px;font-size:15px}#uploadBtn::-webkit-file-upload-button{visibility:hidden}#uploadBtn:before{content:"Upload File";color:#fff;display:inline-block;background:#078b8c!important;border-radius:17px;padding:5px 8px;outline:none;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;font-weight:700;font-size:15px}#uploadBtn:hover:before{border-color:#000}#uploadBtn:active{outline:0}#uploadBtn:active:before{background:linear-gradient(to bottom,#e3e3e3,#f9f9f9)}.header-section .insert-album-section{display:inline-block;float:none!important;margin-left:15px}.loading-message{z-index:110;color:#fff;text-align:center}body:not(.can-select-single) div#insertBtn,body:not(.can-select-single) .image-preview-modal .detail-box .insert-action-section .insert-text{display:none}body:not(.can-select-multiple) .body-section .single-image:hover .select-box,body:not(.can-select-multiple) .body-section .single-image:hover .select-icon-background{display:none}body:not(.can-select-album) div#insertAlbumWrapper{display:none}.canto-uc-subiframe{width:100%;height:100%}.modal-test{height:100%}.modal-status-bar{height:25px;background:linear-gradient(87deg,#078b8c,#fff 50%);margin:-5px 25px 0 0;padding-left:25px;color:#fff;display:none}.canto-asset-preview-stack{background:#f6f6f6;border:1px solid #ccc;margin-bottom:20px;box-shadow:0 0 #0000007f,0 3px 0 -2px #f6f6f6,0 3px 2px -2px #0006,0 7px 0 -4px #f6f6f6,0 7px 2px -4px #0006,0 11px 0 -6px #f6f6f6,0 11px 2px -6px #0006,0 15px 0 -8px #f6f6f6,0 15px 2px -8px #0006,0 19px 0 -10px #f6f6f6,0 19px 2px -10px #0006,0 23px 0 -12px #f6f6f6,0 23px 2px -12px #0006}.flex{display:flex}.hidden{display:none}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@font-face{font-family:icomoon_flight_01;src:url(./icomoon_flight_01-DhBPfpZj.eot?xm1ff0);src:url(./icomoon_flight_01-DhBPfpZj.eot?xm1ff0#iefix) format("embedded-opentype"),url(./icomoon_flight_01-CtquKB8d.ttf?xm1ff0) format("truetype"),url(./icomoon_flight_01-BzS7-7xu.woff?xm1ff0) format("woff"),url(./icomoon_flight_01-Eo0UVPGZ.svg?xm1ff0#icomoon_flight_01) format("svg");font-weight:400;font-style:normal}[class^=icon-],[class*=" icon-"]{font-family:icomoon_flight_01!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-capture:before{content:""}.icon-help:before{content:""}.icon-icn_flight_box_folder_01:before{content:""}.icon-icn_flight_dropbox_folder_01:before{content:""}.icon-icn_flight_googleDrive_folder_01:before{content:""}.icon-dropbox_folder_open:before{content:""}.icon-dropbox_folder:before{content:""}.icon-geo_data:before{content:""}.icon-timeline:before{content:""}.icon-dashboard:before{content:""}.icon-Coordinate:before{content:""}.icon-dimensions:before{content:""}.icon-fullscreen_01:before{content:""}.icon-more01:before{content:""}.icon-cold_restore:before{content:""}.icon-cold_request:before{content:""}.icon-cold_move:before{content:""}.icon-offline:before{content:""}.icon-googleDrive_folder:before{content:""}.icon-googleDrive_folder_open:before{content:""}.icon-library:before{content:""}.icon-triangle-down:before{content:""}.icon-triangle-up:before{content:""}.icon-box_folder:before{content:"}"}.icon-box_folder_open:before{content:"~"}.icon-copy1:before{content:"|"}.icon-copy:before{content:"{"}.icon-add_1:before{content:"`"}.icon-subtract_1:before{content:"a"}.icon-closed2:before{content:"_"}.icon-warning:before{content:"^"}.icon-pdf_preview:before{content:"M"}.icon-rotate_left:before{content:"*"}.icon-rotate_right:before{content:"-"}.icon-move:before{content:"0"}.icon-resize:before{content:":"}.icon-resize2:before{content:">"}.icon-keyphoto:before{content:"?"}.icon-icn_delete:before{content:"&"}.icon-icn_remove:before{content:"'"}.icon-crop:before{content:""}.icon-more:before{content:'"'}.icon-edit:before{content:"#"}.icon-add:before{content:"!"}.icon-icn_expand_02:before{content:""}.icon-icn_linkedin_01:before{content:""}.icon-icn_upload_cloud_01:before{content:""}.icon-icn_checkbox_checked_02:before{content:""}.icon-icn_grid_filled_01:before{content:"I"}.icon-icn_flight_logo_01:before{content:""}.icon-icn_default_user_01:before{content:""}.icon-box_logo_01:before{content:""}.icon-icn_tree4:before{content:""}.icon-icn_tree3:before{content:""}.icon-icn_tree2:before{content:""}.icon-icn_tree:before{content:""}.icon-icn_upload4:before{content:""}.icon-icn_box_filled:before{content:""}.icon-icn_upload3:before{content:""}.icon-icn_dropbox_02:before{content:""}.icon-icn_bell_02:before{content:""}.icon-icn_star_01:before{content:""}.icon-icn_disk_01:before{content:""}.icon-icn_close_x_01:before{content:""}.icon-icn_close_circle_x_01:before{content:""}.icon-icn_checkmark_circle_01:before{content:""}.icon-icn_eye_01:before{content:""}.icon-icn_flight_arrow_up_01:before{content:""}.icon-icn_flight_arrow_down_01:before{content:""}.icon-icn_flight_sort_descend_01:before{content:""}.icon-icn_reload_alt_01:before{content:""}.icon-icn_checkbox_checked_01:before{content:";"}.icon-icn_pencil_01:before{content:"·"}.icon-icn_flight_arrow_left_01:before{content:"≤"}.icon-icn_flight_arrow_right_01:before{content:"≥"}.icon-icn_flight_album_assign_01:before{content:"Å"}.icon-icn_flight_folder_open3{font-family:icomoon!important}.icon-icn_flight_folder_open3:before{content:""}.icon-icn_flight_folder_01{font-family:icomoon!important}.icon-icn_flight_folder_01:before{content:""}.icon-icn_reload_01:before{content:"‰"}.icon-icn_flight_plus_sm_thick_01:before{content:"≠"}.icon-icn_flight_plus_sm_01:before{content:"±"}.icon-icn_flight_power:before{content:"\\"}.icon-icn_checkbox_checked_013:before{content:"<"}.icon-icn_flight_preso:before{content:"."}.icon-cal:before{content:"/"}.icon-icn_flight_sort_01:before{content:"="}.icon-icn_flight_info_01:before{content:","}.icon-icn_flight_preso_01:before{content:")"}.icon-icn_portal_01:before{content:"("}.icon-icn_flight_plus_01:before{content:"]"}.icon-icn_album_01:before{content:"["}.icon-Plus-02:before{content:"¡"}.icon-image:before{content:"b"}.icon-image2:before{content:"c"}.icon-music:before{content:"d"}.icon-film:before{content:"e"}.icon-camera:before{content:"f"}.icon-bullhorn:before{content:""}.icon-book:before{content:"g"}.icon-books:before{content:"h"}.icon-file:before{content:"i"}.icon-file2:before{content:"j"}.icon-file3:before{content:"k"}.icon-file4:before{content:"l"}.icon-stack:before{content:"m"}.icon-folder:before{content:"n"}.icon-folder-open:before{content:"o"}.icon-tag:before{content:""}.icon-notebook:before{content:"p"}.icon-envelope:before{content:"q"}.icon-history:before{content:""}.icon-bell:before{content:"r"}.icon-calendar:before{content:"s"}.icon-screen:before{content:"t"}.icon-laptop:before{content:"u"}.icon-drawer:before{content:"v"}.icon-upload:before{content:"x"}.icon-user:before{content:"y"}.icon-users:before{content:"z"}.icon-user2:before{content:"Z"}.icon-spinner:before{content:"Í"}.icon-search:before{content:"S"}.icon-zoomin:before{content:"A"}.icon-zoomout:before{content:"B"}.icon-key:before{content:""}.icon-lock:before{content:""}.icon-unlocked:before{content:""}.icon-settings:before{content:"ˇ"}.icon-cog:before{content:"C"}.icon-pie:before{content:"D"}.icon-bars:before{content:"E"}.icon-remove:before{content:"F"}.icon-remove2:before{content:"G"}.icon-briefcase:before{content:"H"}.icon-list:before{content:"L"}.icon-menu:before{content:"J"}.icon-tree:before{content:"K"}.icon-download2:before{content:""}.icon-upload2:before{content:""}.icon-flag:before{content:"N"}.icon-star:before{content:"O"}.icon-star2:before{content:"P"}.icon-heart:before{content:"Q"}.icon-heart2:before{content:"R"}.icon-thumbs-up:before{content:"¨"}.icon-info:before{content:"ˆ"}.icon-close:before{content:"ç"}.icon-checkmark:before{content:"T"}.icon-checkmark2:before{content:"U"}.icon-minus:before{content:"µ"}.icon-plus:before{content:"+"}.icon-enter:before{content:"V"}.icon-exit:before{content:"W"}.icon-stop:before{content:""}.icon-arrow-down:before{content:"å"}.icon-checkbox-checked:before{content:"X"}.icon-checkbox-unchecked:before{content:"Y"}.icon-checkbox-partial:before{content:"1"}.icon-radio-checked:before{content:"2"}.icon-radio-unchecked:before{content:"3"}.icon-filter:before{content:"4"}.icon-filter2:before{content:"5"}.icon-table:before{content:"6"}.icon-paragraph-justify:before{content:"7"}.icon-share:before{content:"8"}.icon-mail:before{content:"9"}.icon-googleplus:before{content:""}.icon-googleplus2:before{content:""}.icon-googleplus3:before{content:""}.icon-facebook:before{content:""}.icon-facebook2:before{content:""}.icon-facebook3:before{content:""}.icon-twitter:before{content:""}.icon-twitter2:before{content:""}.icon-twitter3:before{content:""}.icon-wordpress:before{content:""}.icon-wordpress2:before{content:""}.icon-linkedin:before{content:""}.icon-pinterest:before{content:""}.icon-pinterest2:before{content:""}.icon-file-pdf:before{content:"@"}.icon-file-word:before{content:"$"}.icon-file-excel:before{content:"%"}.icon-arrow-up-right:before{content:""}.icon-arrow-right:before{content:""}.icon-arrow-left:before{content:""}.icon-arrow-right2:before{content:""}.icon-arrow-left2:before{content:""}.icon-weather-snow:before{content:""}.icon-uniF16B:before{content:""}.icon-download:before{content:"w"}@font-face{font-family:icomoon;src:url(./icomoon-g9sQ_-ov.eot?n9woxf);src:url(./icomoon-g9sQ_-ov.eot?n9woxf#iefix) format("embedded-opentype"),url(./icomoon-D8MuomEl.ttf?n9woxf) format("truetype"),url(./icomoon-CTtnLMUS.woff?n9woxf) format("woff"),url(./icomoon-Ch5v1q6p.svg?n9woxf#icomoon) format("svg");font-weight:400;font-style:normal}[class^=icon-s-],[class*=" icon-s-"]{font-family:icomoon!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-s-folder-01:before{content:""}.icon-s-more-24:before{content:""}.icon-s-Treemenu-24:before{content:""}.icon-s-arrow-24:before{content:""}.icon-s-profile-24:before{content:""}.icon-s-settings-24:before{content:""}.icon-s-advanceduploader-24:before{content:""}.icon-s-mycollections-24:before{content:""}.icon-s-logoout-24:before{content:""}.icon-s-help-24:before{content:""}.icon-s-gotoportal-24:before{content:""}.icon-s-aboutus-24:before{content:""}.icon-s-TypeASC-20:before{content:""}.icon-s-TypeDESC-20:before{content:""}.icon-s-DateASC-20:before{content:""}.icon-s-DateDESC-20:before{content:""}.icon-s-NameASC:before{content:""}.icon-s-NameDESC:before{content:""}.icon-s-Workspace-20:before{content:""}.icon-s-MasonryGridView-20:before{content:""}.icon-s-Edit-20:before{content:""}.icon-s-Search-20:before{content:""}.icon-s-ThumbnailView-20:before{content:""}.icon-s-GEOView-20:before{content:""}.icon-s-ListView-20:before{content:""}.icon-s-Filter-20:before{content:""}.icon-s-Date-20:before{content:""}.icon-s-Comment-22:before{content:""}.icon-s-Delete-22:before{content:""}.icon-s-UnrelateFile-22:before{content:""}.icon-s-RelateFile-22:before{content:""}.icon-s-Portal-22:before{content:""}.icon-s-AllFiles-32:before{content:""}.icon-s-Audio-32:before{content:""}.icon-s-Documents-32:before{content:""}.icon-s-Images-32:before{content:""}.icon-s-Others-32:before{content:""}.icon-s-Presentations-32:before{content:""}.icon-s-Videos-32:before{content:""}.icon-s-PageDown-32:before{content:""}.icon-s-PageUp-32:before{content:""}.icon-s-Add_Section-32:before{content:""}.icon-s-Portal-32:before{content:""}.icon-s-Error-24:before{content:""}.icon-s-Approval-56:before{content:""}.icon-s-SmartTags-56:before{content:""}.icon-s-Uploadicon-56:before{content:""}.icon-s-importicon-56:before{content:""}.icon-s-Workspace-56:before{content:""}.icon-s-Slack-56:before{content:""}.icon-s-Arrow001-56:before{content:""}.icon-s-Arrow002-56:before{content:""}.icon-s-SelfRegistration-56:before{content:""}.icon-s-InfoPage-56:before{content:""}.icon-s-NewUploadLink-56:before{content:""}.icon-s-UploadLinks-56:before{content:""}.icon-s-Integrations-56:before{content:""}.icon-s-CustomFields-56:before{content:""}.icon-s-Keywords-56:before{content:""}.icon-s-CrewSettings-56:before{content:""}.icon-s-Portal-56:before{content:""}.icon-s-Metadata-56:before{content:""}.icon-s-NewPortal-56:before{content:""}.icon-s-Account-56:before{content:""}.icon-s-Branding-56:before{content:""}.icon-s-PassengerSettings-56:before{content:""}.icon-s-box-56:before{content:""}.icon-s-DigitalRights-56:before{content:""}.icon-s-Dropbox-56:before{content:""}.icon-s-DuplicateCheck-56:before{content:""}.icon-s-NewUser-56:before{content:""}.icon-s-Reports-56:before{content:""}.icon-s-UsersAccounts-56:before{content:""}.icon-s-Workflow-56:before{content:""}.icon-s-Google-56:before{content:""}.icon-s-Defaults-56:before{content:""}.icon-s-Groups-56:before{content:""}.icon-s-lock_16:before{content:""}.icon-s-notlock_16:before{content:""}.icon-s-Type-16:before{content:""}.icon-s-Name-16:before{content:""}.icon-s-Custom-16:before{content:""}.icon-s-Date-16:before{content:""}.icon-s-Warning-16:before{content:""}.icon-canto-eye-16:before{content:""}.icon-s-Unlink_16:before{content:""}.icon-s-Search_16:before{content:""}.icon-s-Refresh_16:before{content:""}.icon-s-RadioButton2_16:before{content:""}.icon-s-RadioButton1_16:before{content:""}.icon-s-UnselectedCheck_32:before{content:""}.icon-s-Ok2_32:before{content:""}.icon-s-Ok1_16:before{content:""}.icon-s-Edit_16:before{content:""}.icon-s-Dropdown_16:before{content:""}.icon-s-Delete_16:before{content:""}.icon-s-Date_16:before{content:""}.icon-s-ClosePopup_16:before{content:""}.icon-s-Checkbox2_16:before{content:""}.icon-s-Checkbox1_16:before{content:""}.icon-s-Cancel_16:before{content:""}.icon-s-BackButton_28:before{content:""}.icon-s-Arrow3_16:before{content:""}.icon-s-Arrow2_16:before{content:""}.icon-s-Arrow1_16:before{content:""}.icon-s-PasswordPolicy-56:before{content:""}.icon-s-dashboard_24:before{content:""}.icon-s-Album_locked-20px:before{content:""}.icon-s-Album-20px:before{content:""}.icon-s-Folder_locked-20px:before{content:""}.icon-s-Folder_open_locked-20px:before{content:""}.icon-s-Folder_open-20px:before{content:""}.icon-s-closeicon-16px:before{content:""}.icon-s-refreshicon-16px:before{content:""}.icon-s-RequestAccessUser-16:before{content:""}.icon-s-LandingPageTempl08-32:before{content:""}.icon-s-LandingPageTempl07-32:before{content:""}.icon-s-LandingPageTempl06-32:before{content:""}.icon-s-LandingPageTempl05-32:before{content:""}.icon-s-LandingPageTempl04-32:before{content:""}.icon-s-LandingPageTempl03-32:before{content:""}.icon-s-LandingPageTempl02-32:before{content:""}.icon-s-LandingPageTempl01-32:before{content:""}.icon-s-db-32:before{content:"";color:#60acec}.icon-s-box-32:before{content:"";color:#307abb}.icon-s-twitter-32:before{content:"";color:#1ab2e8}.icon-s-youtube-32:before{content:"";color:#c8312b}.icon-s-vimeo-32:before{content:"";color:#30b9eb}.icon-s-slack-32:before{content:"";color:#77d4b6}.icon-s-mail-32:before{content:"";color:#566ed6}.icon-s-googledrive-32:before{content:"";color:#029d54}.icon-s-googleanalytics-32:before{content:""}.icon-s-facebook-32:before{content:"";color:#6678c5}.icon-s-pinterest-32:before{content:"";color:#df4a3e}.icon-s-arrow_circle_down-62:before{content:""}.icon-s-Email-56:before{content:""}.icon-s-hamburger-20:before{content:""}.icon-s-dagger_solid-20:before{content:""}.icon-s-dagger-20:before{content:""}.icon-s-align_center-16:before{content:"";color:#8a8a8a}.icon-s-align_left-16:before{content:""}.icon-s-align_right-16:before{content:""}.icon-s-bold-16:before{content:""}.icon-s-calendar-16:before{content:""}.icon-s-italics-16:before{content:""}.icon-s-pencil-16:before{content:""}.icon-s-portal-16:before{content:""}.icon-s-canto-eyeno-16:before{content:""}.icon-s-filter-16:before{content:""}.icon-s-sort-16:before{content:""}.icon-s-undo-16:before{content:""}.icon-s-help-16:before{content:""}.icon-s-layout01-32:before{content:""}.icon-s-layout02-32:before{content:""}.icon-s-layout03-32:before{content:""}.icon-s-layout04-32:before{content:""}.icon-s-layout05-32:before{content:""}.icon-s-layout06-32:before{content:""}.icon-s-layout07-32:before{content:""}.icon-s-layout08-32:before{content:""}.icon-s-layout09-32:before{content:""}.icon-s-layout10-32:before{content:""}.icon-s-layout11-32:before{content:""}.icon-s-layout12-32:before{content:""}.icon-s-layout13-32:before{content:""}.icon-s-layout14-32:before{content:""}.icon-s-TextColor-16:before{content:""}.icon-s-Clone-16:before{content:""}.icon-s-save-16:before{content:""}.icon-s-Portal_Private-20:before{content:""}.icon-s-Portal_Public-20:before{content:""}.icon-s-Portal_Common-20:before{content:""}.icon-s-Keyword-16:before{content:""}.icon-s-single_workspace-20:before{content:""}.icon-s-workspaces-20:before{content:""}.icon-s-Fullscreen:before{content:""}.icon-s-indesignPackage:before{content:""}.icon-s-documentPackage:before{content:""}.icon-s-comments:before{content:""}.icon-s-map:before{content:""}.canto-pickup-img-btn{height:30px;line-height:26px;margin:15px;padding:0 15px;font-size:15px;background-color:#ff9800;font-weight:700;border:0;display:block}.canto-pickup-img-btn:hover{background-color:#c77b09}.canto-uc-frame{position:fixed;width:90%;height:90%;margin:auto;top:5%;left:5%;background:#fff;border:0;box-shadow:0 0 5px #ccc;z-index:999}.canto-uc-frame .header{height:20px;padding:15px;background:#f5f5f5;border-bottom:1px solid #ddd}.canto-uc-frame .header .title{font-size:17px;font-weight:700}.canto-uc-frame .header .close-btn{position:absolute;right:20px;top:14px;font-size:23px;color:#000}.canto-uc-frame .header .close-btn:hover{cursor:pointer}.canto-uc-frame .canto-uc-subiframe{width:100%;position:relative;height:calc(100% - 50px);border:0;padding:0}.text-lowercase{text-transform:lowercase!important}.text-orange{color:#733!important}.text-orange:focus,.text-orange:hover{color:#733}.text-black{color:#000!important}.text-white{color:#fff!important}.text-grey{color:#444!important}body{font-family:sans-serif,Helvetica,Arial;font-size:14px;line-height:1.4286;color:#333;background-color:#fff;min-width:850px;overflow-x:hidden}.canto-body{height:100vh;width:100%;position:relative;overflow:hidden;z-index:1;margin:0}.header-section{height:50px;width:100%;position:relative;background-color:#f5f5f5;box-shadow:0 0 5px #0003}.header-section .library{display:inline-block;cursor:pointer}.header-section .library .treeview-icon{line-height:50px;margin-left:20px;position:relative;top:1px}.header-section .library .treeview-icon:before{margin-right:5px}.header-section .library .treeview-desc{font-size:15px;margin-left:0}.header-section .search-box{display:inline-block;margin-left:25px;width:200px;position:relative}.header-section .search-box input{width:170px;padding:2px 10px;border-radius:15px;border:1px solid #ccc;height:20px}.header-section .search-box span{position:absolute;right:0;top:0;color:#888;height:25px;width:32px;padding-top:7px;padding-left:10px;cursor:pointer}.header-section .filter-section{line-height:50px;margin-right:20px;position:relative;display:inline-block}.header-section .filter-section .type-font{font-size:25px;color:#000;position:relative;top:5px;cursor:pointer}.header-section .filter-section .type-font.current{color:#fff;border-radius:50%;background-color:#222}.header-section .filter-section .type-font:hover{border-radius:50%;background-color:#dedede}.header-section .filter-section .type-font:hover.current{color:#fff;border-radius:50%;background-color:#222}.header-section .selected-count-section{display:inline-block;margin-left:calc(50% - 100px)}.header-section .selected-action-section{display:inline-block;float:right;line-height:50px;margin-right:0}.header-section .selected-action-section .action-icon{font-size:20px;color:#555;margin-right:20px;position:relative;top:3px;cursor:pointer}.header-section .selected-action-section .action-icon:hover{border-radius:50%;color:#333}.header-section .selected-action-section .action-icon.all-selected{color:#111}.header-section .selected-action-section .action-icon.all-selected:hover{color:#000}.header-section .selected-action-section .action-btn{padding:4px 10px;width:54px;background:#555;line-height:50px;margin-top:20px;border-radius:15px;color:#ddd;margin-right:29px;vertical-align:top;cursor:pointer}.header-section .selected-action-section .action-btn:hover{background:#333}.header-section .logout-btn{z-index:3;height:50px;width:47px;background-color:#f5f5f5;border-radius:50%;display:block;cursor:pointer;border:1px solid #f1f1f1;float:right;text-align:center;margin-right:10px}.header-section .logout-btn span{font-size:21px;margin:auto;color:#555;position:relative;line-height:50px}.header-section .logout-btn:hover,.header-section .logout-btn:hover span{color:#333}.max-select-tips{position:fixed;top:50px;text-align:center;left:20%;z-index:100;background:#e89600;color:#fff;font-size:15px;display:none;width:calc(80% - 15px);line-height:35px;opacity:.85}.no-treeview{left:0!important;width:100%!important}.hidden{display:none!important}.tree-view-section{width:20%;border-right:1px solid #ddd;height:calc(100% - 50px);display:inline-block;position:relative;background-color:#f5f5f5;border-top:1px solid #ddd;overflow:scroll}.tree-view-section .tree-view{margin-top:10px}.tree-view-section .tree-view .logo{width:18px;position:relative;display:inline-block;top:5px;vertical-align:top}.tree-view-section .tree-view ul{list-style:none;padding-left:0;cursor:pointer}.tree-view-section .tree-view li{list-style:none;line-height:30px;padding-left:10px;margin-left:10px;position:relative;white-space:nowrap}.tree-view-section .tree-view li:before{content:"";border-left:1px solid #e0e0e0;height:100%;position:absolute;left:-1px}.tree-view-section .tree-view li:after{content:"";left:-1px;position:absolute;right:auto;border-top:1px solid #e0e0e0;height:20px;top:25px;width:15px}.tree-view-section .tree-view li:last-child:before{height:30px}.tree-view-section .tree-view li.selected,.tree-view-section .tree-view li.selected span{color:#ff9800}.tree-view-section .tree-view li.no-child{color:#aaa}.tree-view-section .tree-view li.no-child span{color:#aaa;font-style:italic;margin-left:1px}.tree-view-section .tree-view li .tree-whole-row{position:absolute;height:28px;width:100%;left:0;background-color:#f5f5f5;z-index:0}.tree-view-section .tree-view li .tree-whole-row:hover{background-color:#ddd}.tree-view-section .tree-view i{width:15px;height:20px;display:inline-block;font-size:18px;margin-right:5px;position:relative;top:2px}.tree-view-section .tree-view .folder-loading{width:18px;height:18px;position:relative;top:2px}.tree-view-section .tree-view a,.tree-view-section .tree-view span{color:#666;font-size:14px;z-index:2;position:relative}.tree-view-section .tree-view>ul{padding-left:0;border-left:none}.tree-view-section .tree-view>ul>li:before{border-left:none}.tree-view-section .tree-view>ul>li:after{border-top:none}.body-section{display:inline-block;vertical-align:top;width:80%;position:absolute;left:20%;font-size:0;height:calc(100% - 50px);overflow-y:scroll}.body-section .loading-more{position:fixed;bottom:0;width:calc(80% - 15px);height:33px;z-index:100;background:#bcbcbc;color:#000;text-align:center;font-size:15px;line-height:33px;display:none;left:20%;opacity:.95}.body-section .no-item{position:fixed;top:20%;width:80%;height:50px;z-index:100;color:#626262;display:block;text-align:center;font-size:15px;line-height:35px;font-weight:400}.body-section .image-section{padding:3px}.body-section .single-image{margin:1px;height:189px;width:189px;position:relative;display:inline-block;vertical-align:top;overflow:hidden}.body-section .single-image img{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;opacity:.9}.body-section .single-image .mask-layer{display:none;background-color:#3232324d;z-index:2;height:100%;width:100%;position:absolute;top:0;left:0;overflow:hidden}.body-section .single-image .single-image-name{position:absolute;width:100%;top:100%;background:#3232327f;color:#fff;font-size:12px;line-height:20px;padding:10px 0;text-align:center;z-index:99;word-break:break-all;white-space:pre-wrap}.body-section .single-image .select-box{display:none;position:absolute;top:10px;right:10px;color:#555;font-size:25px;z-index:5}.body-section .single-image .select-icon-background{display:none;background-color:#fff;box-shadow:0 0 6px #777;border-radius:100%;width:23px;height:23px;position:absolute;top:11px;right:11px;z-index:4}.body-section .single-image:hover img{opacity:1}.body-section .single-image:hover .mask-layer,.body-section .single-image:hover .select-box,.body-section .single-image:hover .select-icon-background,.body-section .single-image.selected .select-box,.body-section .single-image.selected .select-icon-background{display:block}.page-mask{z-index:99;position:fixed;width:100%;height:100%;top:0;left:0;background-color:#000c}.loading-icon{z-index:110;position:fixed;width:100%;height:100%;top:0;left:0;background-color:#000c}.loading-icon img{top:50%;left:50%;transform:translate(-50%) translateY(-50%);position:absolute}.loading-icon .loading-icon-circle{top:50%;left:50%;transform:translate(-50%) translateY(-50%);height:50px;width:50px;line-height:32px;position:relative;display:inline-block;overflow:hidden;white-space:nowrap}.loading-icon .loading-icon-circle .loading-icon-markup{animation:icon-spin 2s infinite linear}.loading-icon .loading-icon-circle .loading-icon-markup .icon-color{color:#fff}.view-image-modal{z-index:99;position:fixed;display:block;top:50%;left:50%;transform:translate(-50%) translateY(-50%);max-width:100%;max-height:100%}.view-image-modal .page-mask{z-index:100;position:fixed;width:100%;height:100%;top:0;left:0;background-color:#000c}.view-image-modal img{z-index:101;position:relative;max-width:100vw;max-height:100vh}.view-image-modal .close-btn{position:absolute;right:20px;top:20px;font-size:30px;width:30px;height:30px;color:#fff;z-index:102;cursor:pointer}.image-detail-modal{z-index:99;position:fixed;display:block;width:540px;height:320px;background-color:#fff;top:calc(50% - 150px);left:calc(50% - 250px)}.image-detail-modal .page-mask{z-index:100;position:fixed;width:100%;height:100%;top:0;left:0;background-color:#000c}.image-detail-modal .close-btn{position:absolute;color:#000;right:20px;top:20px;font-size:30px;width:30px;height:30px;z-index:102;cursor:pointer}.image-detail-modal .detail-section{position:relative;padding:20px;z-index:101;width:500px;height:350px;background-color:#fff}.image-detail-modal .detail-section .detail-title{font-size:20px;text-align:center;margin-bottom:10px;margin-top:15px}.image-detail-modal .detail-section .detail-li{line-height:30px}.image-detail-modal .detail-section .detail-li .title{width:200px;text-align:right;display:inline-block;font-size:15px;font-weight:700}.image-detail-modal .detail-section .detail-li .content{text-align:left;margin-left:5px;font-size:15px}.image-detail-modal .insert-btn{line-height:20px;border:1px solid #333;position:absolute;bottom:0;z-index:102;margin:auto;text-align:center;left:190px;padding:5px 10px;border-radius:20px;cursor:pointer}.image-detail-modal .insert-btn:hover{border:1px solid #006799;background-color:#006799;color:#fff}.load-more{position:relative;top:20px;display:block;height:20px;color:#828282;margin:auto;font-size:15px;text-align:center;cursor:pointer}.load-more span{font-family:sans-serif,Helvetica,Arial}.load-more:before{font-size:20px;position:relative;top:5px}.image-preview-modal{z-index:99;position:fixed;width:100%;height:100%;top:0;left:0;background-color:#000000e5;padding:20px;box-sizing:border-box}.image-preview-modal .close-btn{position:absolute;right:20px;top:30px;font-size:25px;color:#fff;cursor:pointer;z-index:99}.image-preview-modal .image-box{position:relative;width:calc(100% - 575px);height:100%}.image-preview-modal .image-box img{position:relative;max-width:100%;max-height:100%;margin:auto;left:50%;top:50%;transform:translate(-50%,-50%)}.image-preview-modal .detail-box{width:575px;top:0;position:absolute;right:0;box-sizing:border-box;height:90%;padding:20px 20px 20px 40px;background-color:#444}.image-preview-modal .detail-box .clear{clear:both}.image-preview-modal .detail-box .detail-list-cotnt{height:75%;overflow-y:auto;position:relative;overflow-x:hidden}.image-preview-modal .detail-box .image-name{font-size:18px;color:#fff;margin-top:15px;line-height:30px;margin-bottom:20px;width:calc(100% - 30px);display:block;position:relative;word-break:break-all}.image-preview-modal .detail-box .detail-item{font-size:12px;line-height:20px;color:#bbb;margin:5px 0}.image-preview-modal .detail-box .detail-item .title{font-weight:700}.image-preview-modal .detail-box .detail-item .more{display:none}.image-preview-modal .detail-box .detail-item.restrict-height .content{max-height:40px;overflow-y:hidden}.image-preview-modal .detail-box .detail-item.restrict-height .more{display:block;float:right;text-decoration:underline;cursor:pointer}.image-preview-modal .detail-box .insert-action-section{position:absolute;padding-bottom:20px;bottom:0;color:#ff9800;background-color:inherit;font-size:17px;width:calc(100% - 40px);box-sizing:border-box;line-height:50px}.image-preview-modal .detail-box .insert-action-section .insert-text{display:inline;color:#fff}.image-preview-modal .detail-box .insert-action-section .cancel-btn{display:inline;background-color:#666;padding:6px 15px;border-radius:15px;color:#fff;font-size:15px;margin-left:40px;cursor:pointer}.image-preview-modal .detail-box .insert-action-section .cancel-btn:hover{background-color:#555}.image-preview-modal .detail-box .insert-action-section .insert-btn{display:inline;background-color:#777;padding:6px 15px;border-radius:15px;color:#fff;font-size:15px;margin:10px;cursor:pointer}.image-preview-modal .detail-box .insert-action-section .insert-btn:hover{background-color:#666}.image-preview-modal .detail-box .insert-action-section .btn-group{float:right;margin-right:10px}.canto-pick-box{width:95%;background-color:#ff9800;padding:10px}.canto-pick-box .header{position:relative}.canto-pick-box .header .title{font-size:16px;font-weight:700;color:#fff}.canto-pick-box .header .close-btn{position:absolute;right:0;top:0;font-size:23px;color:#fff}.canto-pick-box .img-box{background-color:#fff;margin-top:10px;padding:10px}.canto-pick-box .btn-section{text-align:center}.canto-pick-box .btn-section button{height:30px;width:100px;line-height:26px;margin:15px;padding:0;font-size:15px;background-color:#ff9800;color:#fff;border:2px solid #fff;font-weight:700}.canto-pick-box .btn-section button:hover{background-color:#c77b09}.canto-preview-img{width:200px;height:200px;-o-object-fit:cover;object-fit:cover} diff --git a/src/web/assets/dist/assets/app-Dq0P9rbE.css.gz b/src/web/assets/dist/assets/app-Dq0P9rbE.css.gz new file mode 100644 index 0000000..5e8a485 Binary files /dev/null and b/src/web/assets/dist/assets/app-Dq0P9rbE.css.gz differ diff --git a/src/web/assets/dist/assets/app-v6fBqFDY.js b/src/web/assets/dist/assets/app-v6fBqFDY.js deleted file mode 100644 index 8a02dcc..0000000 --- a/src/web/assets/dist/assets/app-v6fBqFDY.js +++ /dev/null @@ -1,2 +0,0 @@ - -//# sourceMappingURL=app-v6fBqFDY.js.map diff --git a/src/web/assets/dist/assets/app-v6fBqFDY.js.map b/src/web/assets/dist/assets/app-v6fBqFDY.js.map deleted file mode 100644 index 2820fc9..0000000 --- a/src/web/assets/dist/assets/app-v6fBqFDY.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"app-v6fBqFDY.js","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/src/web/assets/dist/assets/app-yfeoD6w3.css.gz b/src/web/assets/dist/assets/app-yfeoD6w3.css.gz deleted file mode 100644 index 0b783ef..0000000 Binary files a/src/web/assets/dist/assets/app-yfeoD6w3.css.gz and /dev/null differ diff --git a/src/web/assets/dist/assets/canto-embed-DbXhLEGs.js b/src/web/assets/dist/assets/canto-embed-DbXhLEGs.js new file mode 100644 index 0000000..7d677b9 --- /dev/null +++ b/src/web/assets/dist/assets/canto-embed-DbXhLEGs.js @@ -0,0 +1,11 @@ +let g="",p="",m="",s={},f={},h="",u=[],k=50,b=0,r=!1,B="";const A=100,M=1e3,w="&approval=Approved";let L=null;function _(e){g=e.accessToken,m=e.tenant,p=e.tokenType?e.tokenType:"bearer",f={Authorization:p+" "+g,"Content-Type":"application/x-www-form-urlencoded"},B=e.formatDistrict}s.loadTree=function(e){var a="https://"+m+"/api/v1/tree?sortBy=name&sortDirection=ascending&layer=1";$.ajax({headers:f,type:"GET",url:a,async:!0,error:function(n){alert("load tree error")},success:function(n){e(n.results)}})};s.loadSubTree=function(e,a){let n=`https://${m}/api/v1/tree/${e}`;$.ajax({headers:f,type:"GET",url:n,async:!0,error:function(t){alert("load tree error")},success:function(t){a(t.results)}})};s.getListByAlbum=function(e,a){if(r)return;let n=I(k),t=`https://${m}/api/v1/album/${e}?${n}${w}`;$.ajax({type:"GET",headers:f,url:t,async:!0,error:function(o){alert("load list error")},success:function(o){u.push.apply(u,o.results),o.start||(o.start=0),o.found-o.limit<=o.start?r=!0:r=!1,b=o.start+o.limit+1,$("#loadingMore").delay(1500).fadeOut("slow"),a(o.results)}})};s.getRedirectURL=function(e,a){if(!(e&&a))return;let n=e+"URI";$.ajax({type:"GET",headers:f,url:n,error:function(t){console.error(t.getError())},success:function(t){$("img#"+a).attr("src",t)}})};s.getHugeRedirectURL=function(e,a){if(!(e&&a))return;let n=`${e}URI/2000`;$.ajax({type:"GET",headers:f,url:n,error:function(t){console.error(t.getError())},success:function(t){$("#cantoViewBody").find("#imageBox").find("img").attr("src",t)}})};s.getListByScheme=function(e,a){if(e=="allfile"){let n={scheme:"allfile",keywords:""};s.getFilterList(n,a)}else{if(r)return;let n=I(k),t=`https://${m}/api/v1/${e}?${n}${w}`;$.ajax({type:"GET",headers:f,url:t,async:!1,error:function(o){alert("load list error")},success:function(o){u.push.apply(u,o.results),o.start||(o.start=0),o.found-o.limit<=o.start?r=!0:r=!1,b=o.start+o.limit+1,$("#loadingMore").delay(1500).fadeOut("slow"),a(o.results)}})}};s.getDetail=function(e,a,n){let t=`https://${m}/api/v1/${a}/${e}`;$.ajax({type:"GET",headers:f,url:t,async:!0,error:function(o){alert("load detail error")},success:function(o){n(o)}})};s.getFilterList=function(e,a){if(r)return;let n=I(k),t=`https://${m}/api/v1/search?${n}${w}`;t+=`&keyword=${e.keywords}`,e.scheme&&e.scheme=="allfile"?t+=`&scheme=${encodeURIComponent("image|presentation|document|audio|video|other")}`:e.scheme&&(t+=`&scheme=${e.scheme}`),$.ajax({type:"GET",headers:f,url:t,async:!1,error:function(o){alert("load List error")},success:function(o){u.push.apply(u,o.results),o.start||(o.start=0),o.found-o.limit<=o.start?r=!0:r=!1,b=o.start+o.limit+1,$("#loadingMore").delay(1500).fadeOut("slow"),a(o.results)}})};s.logout=function(){let e=parent,a={};a.type="cantoLogout",e.postMessage(a,"*")};s.paginatedAlbumRequest=async(e,a,n=0)=>{let t=`https://${m}/api/v1/album/${a}`,o=`sortBy=time&sortDirection=descending&limit=${M}&start=${n}${w}`,l=await fetch(`${t}?${o}`,{method:"get",headers:{Authorization:`${p} ${g}`,"Content-Type":"application/json; charset=utf-8"}}).then(c=>c.json());return e.push(...l.results),e.length{let t=`https://${m}/api/v1/batch/content?${w}`;const o=a.slice(n,n+A);let l=await fetch(t,{method:"post",headers:{Authorization:`${p} ${g}`,"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(o)}).then(c=>c.json());return e.push(...l.docResult),e.length{let n=a.length===1?a[0].id:0,t=$("#treeviewSection").find("li.selected");const o=t.data("id");let l=t.find("span").text(),d={type:"closeModal",cantoId:n,cantoAlbumId:0,cantoAssetData:a,cantoAlbumData:{id:o,name:l}};parent.postMessage(d,"*")}).catch(a=>{console.error(a.message),data.type="cantoInsertImage",data.assetList=[],parent.postMessage(data,"*")})};s.insertAlbum=function(e,a){s.paginatedAlbumRequest([],e,0).then(n=>{let o={type:"closeModal",cantoId:0,cantoAlbumId:e,cantoAssetData:n,cantoAlbumData:{id:e,name:a}};parent.postMessage(o,"*")}).catch(n=>{console.error(n.message),data.type="cantoInsertImage",data.assetList=[],parent.postMessage(data,"*")})};$(document).ready(function(){q(),O(),z(),window.addEventListener("message",e=>{let a=e.data;a&&a.accessToken&&a.accessToken.length>0?_(a):_({accessToken:parent.document.querySelector(".canto-uc-subiframe").dataset.access,tenant:parent.document.querySelector(".canto-uc-subiframe").dataset.tenant}),U();let n=$("#cantoViewBody").find(".type-font.current").data("type");$("#cantoViewBody").find("#globalSearch input").val(""),C(n)})});function z(){let e=parent,a={};a.type="getTokenInfo",e.postMessage(a,"*")}function q(){let e=document.getElementsByClassName("canto-uc-subiframe")[0];e&&e.contentDocument}function O(){document.addEventListener("sendTokenInfo",function(n){let t=n.data;g=t.accessToken,t.refreshToken,p=t.tokenType}),$(document).off("click").on("change","#uploadBtnInvisible",n=>{G(n)}).on("click","#uploadBtn",n=>{document.querySelector("#uploadBtnInvisible").click()}).on("click","#treeviewSwitch",function(n){$("#treeviewSection").hasClass("expanded")?($("#treeviewSection").stop().animate({left:"-20%"}),$("#cantoImageBody").stop().animate({width:"100%",left:"0"},v),$("#treeviewSection").removeClass("expanded"),$("#loadingMore").addClass("no-treeview"),$("#noItem").addClass("no-treeview"),$(".max-select-tips").addClass("no-treeview")):($("#treeviewSection").stop().animate({left:"0px"}),$("#cantoImageBody").stop().animate({width:"80%",left:"20%"},v),$("#treeviewSection").addClass("expanded"),$("#loadingMore").removeClass("no-treeview"),$("#noItem").removeClass("no-treeview"),$(".max-select-tips").removeClass("no-treeview"))}).on("click",".type-font",function(n){h="byScheme",$(".type-font").removeClass("current"),$(this).addClass("current"),$("#cantoViewBody").find("#globalSearch input").val(""),$("#cantoViewBody").find("#treeviewSection ul li").removeClass("selected");let t={};t.scheme=$("#cantoViewBody").find(".type-font.current").data("type"),t.keywords="",$("#cantoViewBody").find("#imagesContent").html(""),$("#cantoViewBody").find("#imagesContent").scrollTop(0),r=!1,u=[],s.getFilterList(t,y)}).on("click","#selectAllBtn",function(n){$("#cantoViewBody").find(".single-image .select-box").removeClass("icon-s-Ok2_32"),$("#cantoViewBody").find(".single-image").removeClass("selected"),T()}).on("click","#insertAssetsBtn",function(n){$("#cantoViewBody").find(".loading-icon").removeClass("hidden");let t=[],o=$("#cantoViewBody").find(".single-image .icon-s-Ok2_32").closest(".single-image");for(let l=0;l0))return;let a=[];B&&B.length>1&&(a=B.split(";"));for(let c=0;c150&&(x=d.name.substr(0,142)+"..."+d.name.substr(-5)),S+=`
+ ${d.scheme} +
+
${x}
+ +
`,$("#cantoViewBody").find("#imagesContent").append(S),s.getRedirectURL(d.url.preview,d.id)}$("#cantoViewBody").find(".single-image").length==0?$("#cantoViewBody").find("#noItem").removeClass("hidden"):$("#cantoViewBody").find("#noItem").addClass("hidden");let t=[];$("#cantoViewBody").find(".single-image").hover(function(){let c=$(this).height()-$(this).find(".single-image-name").height()-20;$(this).find(".single-image-name").stop().animate({top:c})},function(){$(this).find(".single-image-name").stop().animate({top:"100%"})}),$("#cantoViewBody").find(".single-image .select-box").off("click").on("click",function(c){if(c.cancelBubble=!0,c.stopPropagation(),c.preventDefault(),t.push($(".single-image").index($(this).closest(".single-image"))),c.shiftKey){let d=Math.min(t[t.length-2],t[t.length-1]),V=Math.max(t[t.length-2],t[t.length-1]);for(i=d;i<=V;i++){if($("#cantoViewBody").find(".single-image .icon-s-Ok2_32").length>=20){$(".max-select-tips").fadeIn("normal").delay(2e3).fadeOut(1e3);return}$(".single-image:eq("+i+") .select-box").addClass("icon-s-Ok2_32"),$(".single-image:eq("+i+")").addClass("selected")}}else if($("#cantoViewBody").find(".single-image .icon-s-Ok2_32").length>=20){$(this).hasClass("icon-s-Ok2_32")||$(".max-select-tips").fadeIn("normal").delay(2e3).fadeOut(1e3),$(this).removeClass("icon-s-Ok2_32"),$(this).closest(".single-image").removeClass("selected");return}else $(this).toggleClass("icon-s-Ok2_32"),$(this).closest(".single-image").toggleClass("selected");T()}),v(),T();let o=$("#cantoImageBody").height();$("#imagesContent").height()l?($(o).removeClass("hidden"),t.slice(0,l)+"..."):($(o).addClass("hidden"),t)};if(e){$("#cantoViewBody").find("#imagebox_name").html(e.name),$("#cantoViewBody").find("#imagebox_size").html(Math.round(e.size/1024)+"KB"),$("#cantoViewBody").find("#imagebox_created").html(e.metadata&&e.metadata["Create Date"]?e.metadata["Create Date"]:" "),$("#cantoViewBody").find("#imagebox_uploaded").html(F(e.lastUploaded)),$("#cantoViewBody").find("#imagebox_status").html(e.approvalStatus);let t=$("#imagebox_copyright").closest(".detail-item").find(".more");$("#cantoViewBody").find("#imagebox_copyright").html(a(e.copyright,t,177)),$("#cantoViewBody").find("#imagebox_copyright").data("field",e.copyright);let o=$("#imagebox_tac").closest(".detail-item").find(".more");$("#cantoViewBody").find("#imagebox_tac").html(a(e.termsAndConditions,o,160)),$("#cantoViewBody").find("#imagebox_tac").data("field",e.termsAndConditions),$("#cantoViewBody").find("#insertBtn").data("id",e.id),$("#cantoViewBody").find("#insertBtn").data("scheme",e.scheme)}let n=$("#cantoViewBody").find("#imagePreviewModal");$("#cantoViewBody").find(".loading-icon").addClass("hidden"),n.removeClass("hidden"),$("#cantoViewBody").find("#imagePreviewModal .close-btn").off("click").on("click",function(){n.addClass("hidden")}),$("#cantoViewBody").find("#imagePreviewModal #cancelBtn").off("click").on("click",function(){n.addClass("hidden")}),$("#cantoViewBody").find("#imagePreviewModal .detail-item .more").off("click").on("click",function(){let t=$(this).closest(".detail-item").find(".content").data("field");$(this).closest(".detail-item").find(".content").html(t),$(this).addClass("hidden")}),$("#cantoViewBody").find("#imagePreviewModal #insertBtn").off("click").on("click",function(){$("#cantoViewBody").find(".loading-icon").removeClass("hidden");let t=[{id:e.id,scheme:e.scheme}];s.insertImage(t)})}function F(e){return e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2)+" "+e.substr(8,2)+":"+e.substr(10,2)}function U(){s.loadTree(P)}let P=function(e){let a="";a=H(e),$("#cantoViewBody").find("#treeviewContent").append(a),$("#cantoViewBody").find("#treeviewContent > ul").animate({height:"toggle"})},H=function(e){let a="
    ";return $.each(e,function(n,t){let o=" ";t.size==0?o="no-child":t.scheme=="folder"&&(o="has-sub-folder"),a+=`
  • `;let l="icon-s-Folder_open-20px";t.scheme=="album"&&(l="icon-s-Album-20px"),a+=` + + ${t.name} +
  • `}),a+="
",a},N=function(e){let a=R(e);$("#cantoViewBody").find(".current-tree-node").append(a),$("#cantoViewBody").find(".current-tree-node > ul").animate({height:"toggle"}),$("#cantoViewBody").find(".current-tree-node").find(".folder-loading").addClass("hidden"),$("#cantoViewBody").find(".current-tree-node").find(".icon-s-Folder_open-20px").removeClass("hidden"),$("#cantoViewBody").find(".current-tree-node").removeClass("current-tree-node")},R=function(e){let a="
    ";return $.each(e,function(n,t){let o=" ";t.size==0&&(o="no-child"),a+=`
  • `;let l="icon-s-Folder_open-20px";t.scheme=="album"&&(l="icon-s-Album-20px"),a+=` + ${t.name}`,t.children&&t.children.length&&(a+=R(t.children)),a+="
  • "}),a+="
",a};function v(){let e=8,a=Number($("#cantoViewBody").find("#imagesContent")[0].offsetWidth),n=0,t=function(l){if(n=Number((a-8)/l-2),n>=160&&n<=210)return n;n<160?(l--,t(l)):n>210&&(l++,t(l))},o=t(e);$("#cantoViewBody").find(".single-image").css("width",o)}function W(){let e=$("#cantoImageBody").height(),a=$("#imagesContent").height(),n=$("#cantoImageBody").scrollTop(),t=a-e-n<0,o=$(".single-image").length==0;return t&&!o}function I(e){let a=u.length==0?0:b,n="sortBy=time&sortDirection=descending&limit="+e+"&start="+a;return $(".single-image").length!==0?$("#loadingMore").fadeIn("slow"):$("#cantoViewBody").find("#imagesContent").html(""),n}function E(){if(h=="bySearch"){let e=$("#cantoViewBody").find("#globalSearch input").val();if(!e)return;let a=$("#cantoViewBody").find(".type-font.current").data("type"),n={};n.scheme=a,n.keywords=e,s.getFilterList(n,y)}else if(h=="bytree"){let e=$("#cantoViewBody").find("#treeviewSection ul li").find(".selected").data("id");s.getListByAlbum(e,y)}else{let e=$("#cantoViewBody").find(".type-font.current").data("type");C(e)}}function G(e){let a=`https://${m}/api/v1/upload/setting`;fetch(a,{method:"GET",headers:{Authorization:`${p} ${g}`,"Content-Type":"application/json; charset=utf-8"}}).then(t=>t.json()).then(t=>{const o=new FormData;o.append("key",t.key),o.append("acl",t.acl),o.append("AWSAccessKeyId",t.AWSAccessKeyId),o.append("Policy",t.Policy),o.append("Signature",t.Signature),o.append("x-amz-meta-file_name",e.currentTarget.files[0].name),o.append("x-amz-meta-tag",""),o.append("x-amz-meta-scheme",""),o.append("x-amz-meta-id",""),o.append("x-amz-meta-album_id",L),o.append("file",e.currentTarget.files[0]),parent.document.querySelector(".modal-status-bar"),fetch(t.url,{method:"post",body:o,mode:"no-cors",redirect:"follow"}).then(l=>{document.getElementById("uploadBtn").style.background="linear-gradient(16deg, rgb(205 101 1) 0%, rgb(169 218 0 / 100%) 100%)",document.getElementById("uploadBtn").value="Uploading image..."}).catch(l=>{console.log(l)}).finally(()=>{document.getElementById("uploadBtn").value="Upload complete - processing",n(e.currentTarget.files[0].name)})}).catch(t=>{console.log("An error occurred while attempting to grab upload settings!"),console.log(t)});function n(t){let o=`https://${m}/api/v1/upload/status?hours=1`;parent.document.querySelector(".modal-status-bar"),setInterval(()=>{fetch(o,{method:"get",headers:{Authorization:p+" "+g}}).then(l=>l.json()).then(l=>{l.results&&l.results.length>0&&l.results.filter(d=>{if(d.name==t&&d.status!="Done")return d}).filter(d=>d!=null).length==0&&(document.getElementById("uploadBtn").value="Canto processing complete! Reloading",window.location.reload())}).catch(l=>{console.log("an error occurred!"),console.log(l)})},5e3)}}parent.document.querySelector(".modal-status-bar").style.display="none"; +//# sourceMappingURL=canto-embed-DbXhLEGs.js.map diff --git a/src/web/assets/dist/assets/canto-embed-DbXhLEGs.js.gz b/src/web/assets/dist/assets/canto-embed-DbXhLEGs.js.gz new file mode 100644 index 0000000..58c67ad Binary files /dev/null and b/src/web/assets/dist/assets/canto-embed-DbXhLEGs.js.gz differ diff --git a/src/web/assets/dist/assets/canto-embed-DbXhLEGs.js.map b/src/web/assets/dist/assets/canto-embed-DbXhLEGs.js.map new file mode 100644 index 0000000..86759b2 --- /dev/null +++ b/src/web/assets/dist/assets/canto-embed-DbXhLEGs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"canto-embed-DbXhLEGs.js","sources":["../../../../../buildchain/src/js/canto-embed.js"],"sourcesContent":["let cantoViewDom = {};\nlet _accessToken = \"\";\nlet _refreshToken = \"\";\nlet _tokenType = \"\";\nlet _tenants = \"\";\nlet cantoAPI = {};\nlet _APIHeaders = {};\nlet searchedBy = \"\"; //bySearch bytree byScheme''\nlet currentImageList = [];\nlet singleCountLoad = 50;\nlet apiNextStart = 0;\nlet isLoadingComplete = false;\nlet _formatDistrict = '';\nconst MAX_CONTENT_REQUEST_ITEMS = 100;\nconst MAX_ALBUM_REQUEST_ITEMS = 1000;\nconst FILTER_BY_APPROVED = \"&approval=Approved\";\nlet selectedAlbum = null;\n\n/* -----------------canto API start-------------------------------------------------------------*/\n\nfunction setToken(tokenInfo) {\n _accessToken = tokenInfo.accessToken;\n _tenants = tokenInfo.tenant;\n _tokenType = tokenInfo.tokenType ? tokenInfo.tokenType : \"bearer\";\n _APIHeaders = {\n \"Authorization\": _tokenType + \" \" + _accessToken,\n \"Content-Type\": \"application/x-www-form-urlencoded\"\n };\n _formatDistrict = tokenInfo.formatDistrict;\n}\n\ncantoAPI.loadTree = function (callback) {\n var url = \"https://\" + _tenants + \"/api/v1/tree?sortBy=name&sortDirection=ascending&layer=1\";\n $.ajax({\n headers: _APIHeaders,\n type: \"GET\",\n url: url,\n async: true,\n error: function (request) {\n alert(\"load tree error\");\n },\n success: function (data) {\n callback(data.results);\n }\n });\n};\ncantoAPI.loadSubTree = function (treeID, callback) {\n let url = `https://${_tenants}/api/v1/tree/${treeID}`;\n $.ajax({\n headers: _APIHeaders,\n type: \"GET\",\n url: url,\n async: true,\n error: function (request) {\n alert(\"load tree error\");\n },\n success: function (data) {\n callback(data.results);\n }\n });\n};\ncantoAPI.getListByAlbum = function (albumID, callback) {\n if (isLoadingComplete) {\n return;\n }\n let filterString = loadMoreHandler(singleCountLoad);\n let url = `https://${_tenants}/api/v1/album/${albumID}?${filterString}${FILTER_BY_APPROVED}`;\n $.ajax({\n type: \"GET\",\n headers: _APIHeaders,\n url: url,\n async: true,\n error: function (request) {\n alert(\"load list error\");\n },\n success: function (data) {\n currentImageList.push.apply(currentImageList, data.results);\n if (!data.start) {\n data.start = 0;\n }\n if (data.found - data.limit <= data.start) {\n isLoadingComplete = true;\n } else {\n isLoadingComplete = false;\n }\n apiNextStart = data.start + data.limit + 1;\n $(\"#loadingMore\").delay(1500).fadeOut(\"slow\");\n callback(data.results);\n }\n });\n};\ncantoAPI.getRedirectURL = function (previewURL, ID) {\n if (!(previewURL && ID)) return;\n let url = previewURL + 'URI';\n $.ajax({\n type: \"GET\",\n headers: _APIHeaders,\n url: url,\n error: function (request) {\n console.error(request.getError());\n },\n success: function (data) {\n $(\"img#\" + ID).attr('src', data);\n }\n });\n};\ncantoAPI.getHugeRedirectURL = function (previewURL, ID) {\n if (!(previewURL && ID)) return;\n let url = `${previewURL}URI/2000`;\n $.ajax({\n type: \"GET\",\n headers: _APIHeaders,\n url: url,\n error: function (request) {\n console.error(request.getError());\n },\n success: function (data) {\n let $viewImageModal = $(\"#cantoViewBody\").find(\"#imageBox\");\n $viewImageModal.find(\"img\").attr(\"src\", data);\n }\n });\n};\n\n\ncantoAPI.getListByScheme = function (scheme, callback) {\n if (scheme == \"allfile\") {\n let data = {scheme: \"allfile\", keywords: \"\"};\n cantoAPI.getFilterList(data, callback);\n } else {\n if (isLoadingComplete) {\n return;\n }\n let filterString = loadMoreHandler(singleCountLoad);\n let url = `https://${_tenants}/api/v1/${scheme}?${filterString}${FILTER_BY_APPROVED}`;\n $.ajax({\n type: \"GET\",\n headers: _APIHeaders,\n url: url,\n async: false,\n error: function (request) {\n alert(\"load list error\");\n },\n success: function (data) {\n currentImageList.push.apply(currentImageList, data.results);\n if (!data.start) {\n data.start = 0;\n }\n if (data.found - data.limit <= data.start) {\n isLoadingComplete = true;\n } else {\n isLoadingComplete = false;\n }\n apiNextStart = data.start + data.limit + 1;\n $(\"#loadingMore\").delay(1500).fadeOut(\"slow\");\n callback(data.results);\n }\n });\n }\n\n};\n\ncantoAPI.getDetail = function (contentID, scheme, callback) {\n let url = `https://${_tenants}/api/v1/${scheme}/${contentID}`;\n $.ajax({\n type: \"GET\",\n headers: _APIHeaders,\n url: url,\n async: true,\n error: function (request) {\n alert(\"load detail error\");\n },\n success: function (data) {\n callback(data);\n }\n });\n};\n\ncantoAPI.getFilterList = function (data, callback) {\n if (isLoadingComplete) {\n return;\n }\n let filterString = loadMoreHandler(singleCountLoad);\n let url = `https://${_tenants}/api/v1/search?${filterString}${FILTER_BY_APPROVED}`;\n url += `&keyword=${data.keywords}`;\n if (data.scheme && data.scheme == \"allfile\") {\n url += `&scheme=${encodeURIComponent(\"image|presentation|document|audio|video|other\")}`;\n } else if (data.scheme) {\n url += `&scheme=${data.scheme}`;\n }\n $.ajax({\n type: \"GET\",\n headers: _APIHeaders,\n url: url,\n async: false,\n error: function (request) {\n alert(\"load List error\");\n },\n success: function (data) {\n currentImageList.push.apply(currentImageList, data.results);\n if (!data.start) {\n data.start = 0;\n }\n if (data.found - data.limit <= data.start) {\n isLoadingComplete = true;\n } else {\n isLoadingComplete = false;\n }\n apiNextStart = data.start + data.limit + 1;\n $(\"#loadingMore\").delay(1500).fadeOut(\"slow\");\n callback(data.results);\n }\n });\n};\n\ncantoAPI.logout = function () {\n //clear cookie and trun to login page.\n let targetWindow = parent;\n let data = {};\n data.type = \"cantoLogout\";\n targetWindow.postMessage(data, '*');\n};\n\n/**\n * Retrieve all of the assets from the albumId album, paginated to handle API limits\n *\n * @param {[]} buffer\n * @param {string} albumId\n * @param {number} start\n * @returns {Promise<*>}\n */\ncantoAPI.paginatedAlbumRequest = async (buffer, albumId, start = 0) => {\n let url = `https://${_tenants}/api/v1/album/${albumId}`;\n let filterString = `sortBy=time&sortDirection=descending&limit=${MAX_ALBUM_REQUEST_ITEMS}&start=${start}${FILTER_BY_APPROVED}`;\n let result = await fetch(`${url}?${filterString}`, {\n method: \"get\",\n headers: {\n \"Authorization\": `${_tokenType} ${_accessToken}`,\n \"Content-Type\": \"application/json; charset=utf-8\"\n },\n }).then((response) => {\n return response.json();\n });\n buffer.push(...result['results']);\n if (buffer.length < result.found) {\n return cantoAPI.paginatedAlbumRequest(buffer, albumId, start + MAX_ALBUM_REQUEST_ITEMS);\n } else {\n return buffer;\n }\n}\n\n/**\n * Retrieve all of the assets in the imageArray array, paginated to handle API limits\n *\n * @param {[]} buffer\n * @param {{id: string, scheme: string}[]} imageArray\n * @param {number} start\n * @returns {Promise<*>}\n */\ncantoAPI.paginatedContentRequest = async (buffer, imageArray, start = 0) => {\n let url = `https://${_tenants}/api/v1/batch/content?${FILTER_BY_APPROVED}`;\n const imageArraySubset = imageArray.slice(start, start + MAX_CONTENT_REQUEST_ITEMS);\n let result = await fetch(url, {\n method: \"post\",\n headers: {\n \"Authorization\": `${_tokenType} ${_accessToken}`,\n \"Content-Type\": \"application/json; charset=utf-8\"\n },\n body: JSON.stringify(imageArraySubset)\n }).then((response) => {\n return response.json();\n });\n buffer.push(...result['docResult']);\n if (buffer.length < imageArray.length) {\n return cantoAPI.paginatedContentRequest(buffer, imageArray, start + MAX_CONTENT_REQUEST_ITEMS);\n } else {\n return buffer;\n }\n}\n\n/**\n * Insert the images in imageArray into the CMS\n *\n * @param {{id: string, scheme: string}[]} imageArray\n */\ncantoAPI.insertImage = function (imageArray) {\n if (!(imageArray && imageArray.length)) {\n return;\n }\n cantoAPI.paginatedContentRequest([], imageArray, 0).then((response) => {\n // Get the id of the canto asset, or 0 if it is a collection of images\n let id = response.length === 1 ? response[0].id : 0;\n // Gather information about the selected album\n let album = $(\"#treeviewSection\").find(\"li.selected\");\n const albumId = album.data('id');\n let albumName = album.find('span').text();\n const albumData = {\n id: albumId,\n name: albumName,\n };\n // Compose the payload to send as an event\n let data = {\n type: \"closeModal\",\n // The id of the canto asset, or 0 if it not a single image selection\n cantoId: id,\n // The id of the album, or 0 if it not a full album selection\n cantoAlbumId: 0,\n cantoAssetData: response,\n cantoAlbumData: albumData,\n };\n // Let our canto-field.js know what asset(s) were picked\n parent.postMessage(data, '*');\n }).catch((error) => {\n console.error(error.message);\n data.type = \"cantoInsertImage\";\n data.assetList = [];\n parent.postMessage(data, '*');\n });\n};\n\n/**\n * Insert the images in imageArray into the CMS\n *\n * @param {string} albumId\n * @param {string} albumName\n */\ncantoAPI.insertAlbum = function (albumId, albumName) {\n cantoAPI.paginatedAlbumRequest([], albumId, 0).then((response) => {\n // Gather information about the selected album\n const albumData = {\n id: albumId,\n name: albumName,\n };\n // Compose the payload to send as an event\n let data = {\n type: \"closeModal\",\n // The id of the canto asset, or 0 if it not a single image selection\n cantoId: 0,\n // The id of the album, or 0 if it not a full album selection\n cantoAlbumId: albumId,\n cantoAssetData: response,\n cantoAlbumData: albumData,\n };\n // Let our canto-field.js know what asset(s) were picked\n parent.postMessage(data, '*');\n }).catch((error) => {\n console.error(error.message);\n data.type = \"cantoInsertImage\";\n data.assetList = [];\n parent.postMessage(data, '*');\n });\n};\n\n/* -----------------canto API end--------------------------------------------------------*/\n\n$(document).ready(function () {\n getFrameDom();\n addEventListener();\n getTokenInfo();\n\n window.addEventListener(\"message\", (event) => {\n let tokenInfo = event.data;\n\n if (tokenInfo && tokenInfo.accessToken && tokenInfo.accessToken.length > 0) {\n setToken(tokenInfo);\n } else {\n setToken({\n accessToken: parent.document.querySelector(\".canto-uc-subiframe\").dataset.access,\n tenant: parent.document.querySelector(\".canto-uc-subiframe\").dataset.tenant,\n });\n }\n treeviewDataHandler();\n let initSchme = $(\"#cantoViewBody\").find(\".type-font.current\").data(\"type\");\n $(\"#cantoViewBody\").find(\"#globalSearch input\").val(\"\");\n getImageInit(initSchme);\n });\n\n\n});\n\nfunction getTokenInfo() {\n let targetWindow = parent;\n let data = {};\n data.type = \"getTokenInfo\";\n targetWindow.postMessage(data, '*');\n}\n\nfunction getFrameDom() {\n let parentDocument = document;\n let contentIframe = document.getElementsByClassName('canto-uc-subiframe')[0];\n if (contentIframe) {\n parentDocument = contentIframe.contentDocument;\n }\n cantoViewDom = parentDocument;\n}\n\nfunction addEventListener() {\n document.addEventListener('sendTokenInfo', function (e) {\n let tokenInfo = e.data;\n _accessToken = tokenInfo.accessToken;\n _refreshToken = tokenInfo.refreshToken;\n _tokenType = tokenInfo.tokenType;\n });\n\n $(document).off('click').on(\"change\", \"#uploadBtnInvisible\", (e) => {\n uploadFileToCanto(e);\n })\n .on(\"click\", \"#uploadBtn\", (e) => {\n document.querySelector(\"#uploadBtnInvisible\").click();\n })\n .on(\"click\", \"#treeviewSwitch\", function (e) {\n if ($('#treeviewSection').hasClass(\"expanded\")) {\n $('#treeviewSection').stop().animate({\n left: '-20%'\n });\n $('#cantoImageBody').stop().animate({\n width: '100%',\n left: '0'\n }, imageResize);\n $('#treeviewSection').removeClass(\"expanded\");\n $(\"#loadingMore\").addClass(\"no-treeview\");\n $(\"#noItem\").addClass(\"no-treeview\");\n $(\".max-select-tips\").addClass(\"no-treeview\");\n } else {\n $('#treeviewSection').stop().animate({\n left: '0px'\n });\n $('#cantoImageBody').stop().animate({\n width: '80%',\n left: '20%'\n }, imageResize);\n $('#treeviewSection').addClass(\"expanded\");\n $(\"#loadingMore\").removeClass(\"no-treeview\");\n $(\"#noItem\").removeClass(\"no-treeview\");\n $(\".max-select-tips\").removeClass(\"no-treeview\");\n }\n\n })\n .on(\"click\", \".type-font\", function (e) {\n searchedBy = \"byScheme\";\n $(\".type-font\").removeClass(\"current\");\n $(this).addClass(\"current\");\n // let type = $(this).data(\"type\");\n $(\"#cantoViewBody\").find(\"#globalSearch input\").val(\"\");\n $(\"#cantoViewBody\").find(\"#treeviewSection ul li\").removeClass(\"selected\");\n\n let data = {};\n data.scheme = $(\"#cantoViewBody\").find(\".type-font.current\").data(\"type\");\n data.keywords = \"\";\n $(\"#cantoViewBody\").find(\"#imagesContent\").html(\"\");\n $(\"#cantoViewBody\").find(\"#imagesContent\").scrollTop(0);\n isLoadingComplete = false;\n currentImageList = [];\n cantoAPI.getFilterList(data, imageListDisplay);\n\n })\n .on(\"click\", \"#selectAllBtn\", function (e) {\n $(\"#cantoViewBody\").find('.single-image .select-box').removeClass(\"icon-s-Ok2_32\");\n $(\"#cantoViewBody\").find(\".single-image\").removeClass(\"selected\");\n handleSelectedMode();\n })\n .on(\"click\", \"#insertAssetsBtn\", function (e) {\n $(\"#cantoViewBody\").find(\".loading-icon\").removeClass(\"hidden\");\n let assetArray = [];\n let selectedArray = $(\"#cantoViewBody\").find(\".single-image .icon-s-Ok2_32\").closest(\".single-image\");\n for (let i = 0; i < selectedArray.length; i++) {\n let obj = {};\n obj.id = $(selectedArray[i]).data(\"id\");\n obj.scheme = $(selectedArray[i]).data(\"scheme\");\n assetArray.push(obj);\n }\n cantoAPI.insertImage(assetArray);\n })\n // Allow for the insertion of the entire album into the target system\n .on(\"click\", \"#insertAlbumBtn\", function (e) {\n $(\"#cantoViewBody\").find(\".loading-icon\").removeClass(\"hidden\");\n let album = $(\"#treeviewSection\").find(\"li.selected\");\n const albumId = album.data('id');\n let albumName = album.find('span').text();\n cantoAPI.insertAlbum(albumId, albumName);\n })\n .on(\"click\", \".icon-s-Fullscreen\", function (e) {\n e.cancelBubble = true;\n e.stopPropagation();\n e.preventDefault();\n $(\"#cantoViewBody\").find(\".loading-icon\").removeClass(\"hidden\");\n let targetURL = $(e.currentTarget).closest(\".single-image\").data(\"xurl\");\n let previewURL = targetURL + \"?Authorization=\" + _accessToken;\n displayFullyImage(previewURL);\n })\n .on(\"click\", \".single-image\", function (e) {\n $(\"#cantoViewBody\").find(\".loading-icon\").removeClass(\"hidden\");\n //display image\n let targetURL = $(e.currentTarget).closest(\".single-image\").data(\"xurl\");\n let targetID = $(e.currentTarget).closest(\".single-image\").data(\"id\");\n cantoAPI.getHugeRedirectURL(targetURL, targetID);\n //display detail\n let id = $(this).data(\"id\");\n let scheme = $(this).data(\"scheme\");\n cantoAPI.getDetail(id, scheme, imageNewDetail);\n })\n .on(\"click\", \"#logoutBtn\", function (e) {\n $(\".loading-icon\").removeClass(\"hidden\");\n cantoAPI.logout();\n })\n //treeview event\n .on(\"click\", \"#treeviewSection ul li\", function (e) {\n // Track active album for upload purposes\n selectedAlbum = e.currentTarget.dataset.id;\n\n e.cancelBubble = true;\n e.stopPropagation();\n e.preventDefault();\n let childList = $(e.currentTarget).children(\"ul\");\n // childList.toggleClass(\"hidden\");\n if (\"treeviewContent\" == $(e.currentTarget)[0].id) {\n //load init image list.\n $(\"#cantoViewBody\").find(\"#globalSearch input\").val(\"\");\n $(\"#cantoViewBody\").find(\"#treeviewSection ul li\").removeClass(\"selected\");\n $(\"#cantoViewBody\").find(\".type-font\").removeClass(\"current\");\n $(\"#cantoViewBody\").find(\"#imagesContent\").html(\"\");\n $(\"#cantoViewBody\").find(\"#imagesContent\").scrollTop(0);\n currentImageList = [];\n searchedBy = \"\";\n isLoadingComplete = false;\n getImageInit(\"allfile\");\n\n } else if (childList && childList.length) {\n childList.animate({\n height: 'toggle'\n });\n } else if ($(e.currentTarget).hasClass(\"has-sub-folder\")) {\n let subTreeId = $(e.currentTarget).data(\"id\");\n $(e.currentTarget).addClass(\"current-tree-node\");\n $(e.currentTarget).find(\".folder-loading\").removeClass(\"hidden\");\n $(e.currentTarget).find(\".icon-s-Folder_open-20px\").addClass(\"hidden\");\n cantoAPI.loadSubTree(subTreeId, subTreeRender);\n\n } else {\n $(\"#treeviewSection ul li\").removeClass(\"selected\");\n $(\"#cantoViewBody\").find(\".type-font\").removeClass(\"current\");\n $(\"#insertAlbumWrapper\").removeClass(\"hidden\");\n $(e.currentTarget).addClass(\"selected\");\n $(\"#cantoViewBody\").find(\"#globalSearch input\").val(\"\");\n $(\"#cantoViewBody\").find(\"#imagesContent\").html(\"\");\n $(\"#cantoViewBody\").find(\"#imagesContent\").scrollTop(0);\n currentImageList = [];\n isLoadingComplete = false;\n searchedBy = \"bytree\";\n let albumId = $(e.currentTarget).data(\"id\");\n cantoAPI.getListByAlbum(albumId, imageListDisplay);\n }\n\n })\n .on(\"click\", \"#globalSearchBtn\", function (e) {\n let value = $(\"#cantoViewBody\").find(\"#globalSearch input\").val();\n if (!value) {\n //load init image list.\n $(\"#cantoViewBody\").find(\"#treeviewSection ul li\").removeClass(\"selected\");\n let initSchme = $(\"#cantoViewBody\").find(\".type-font.current\").data(\"type\");\n $(\"#cantoViewBody\").find(\"#globalSearch input\").val(\"\");\n $(\"#cantoViewBody\").find(\"#imagesContent\").html(\"\");\n $(\"#cantoViewBody\").find(\"#imagesContent\").scrollTop(0);\n currentImageList = [];\n searchedBy = \"\";\n isLoadingComplete = false;\n getImageInit(initSchme);\n }\n searchedBy = \"bySearch\";\n isLoadingComplete = false;\n $(\"#cantoViewBody\").find(\"#treeviewSection ul li\").removeClass(\"selected\");\n $(\"#cantoViewBody\").find(\".type-font\").removeClass(\"current\");\n let initSchme = $(\"#cantoViewBody\").find(\".type-font.current\").data(\"type\");\n let data = {};\n data.scheme = initSchme;\n data.keywords = value;\n $(\"#cantoViewBody\").find(\"#imagesContent\").html(\"\");\n $(\"#cantoViewBody\").find(\"#imagesContent\").scrollTop(0);\n currentImageList = [];\n cantoAPI.getFilterList(data, imageListDisplay);\n });\n $(\"#cantoViewBody\").find(\"#cantoImageBody\").on(\"scroll\", function () {\n if (isScrollToPageBottom() && !isLoadingComplete) {\n loadMoreAction();\n }\n });\n\n let inputObj = $(\"#cantoViewBody\").find(\"#globalSearch input\");\n $(inputObj).bind('keyup', function (event) {\n if (event.keyCode == \"13\") {\n $(\"#cantoViewBody\").find('#globalSearchBtn').click();\n }\n });\n\n let imageListSection = $(\"#cantoViewBody\").find(\"#cantoImageBody\");\n $(imageListSection).resize(function () {\n imageResize();\n });\n}\n\nfunction getImageInit(scheme) {\n cantoAPI.getListByScheme(scheme, imageListDisplay);\n}\n\nfunction imageListDisplay(imageList) {\n if (!(imageList && imageList.length > 0)) {\n return;\n }\n let formatArr = [];\n if (_formatDistrict && _formatDistrict.length > 1) {\n formatArr = _formatDistrict.split(\";\");\n }\n for (let i = 0; i < imageList.length; i++) {\n let d = imageList[i];\n let extension = d.name.substring(d.name.lastIndexOf('.') + 1);\n if (formatArr.length && !formatArr.includes(extension)) {\n continue;\n }\n let html = \"\";\n let disname = d.name;\n if (d.name.length > 150) {\n disname = d.name.substr(0, 142) + '...' + d.name.substr(-5);\n }\n html += `
\n \"${d.scheme}\"\n
\n
${disname}
\n \n
`;\n $(\"#cantoViewBody\").find(\"#imagesContent\").append(html);\n cantoAPI.getRedirectURL(d.url.preview, d.id);\n }\n let currentCount = $(\"#cantoViewBody\").find('.single-image').length;\n if (currentCount == 0) {\n $(\"#cantoViewBody\").find(\"#noItem\").removeClass(\"hidden\");\n } else {\n $(\"#cantoViewBody\").find(\"#noItem\").addClass(\"hidden\");\n }\n let rem = [];\n $(\"#cantoViewBody\").find('.single-image').hover(function () {\n let nameTop = $(this).height() - $(this).find(\".single-image-name\").height() - 20;\n $(this).find('.single-image-name').stop().animate({top: nameTop});\n }, function () {\n $(this).find('.single-image-name').stop().animate({top: '100%'});\n });\n $(\"#cantoViewBody\").find('.single-image .select-box').off('click').on('click', function (e) {\n e.cancelBubble = true;\n e.stopPropagation();\n e.preventDefault();\n\n rem.push($(\".single-image\").index($(this).closest(\".single-image\")));\n if (e.shiftKey) {\n let iMin = Math.min(rem[rem.length - 2], rem[rem.length - 1]);\n let iMax = Math.max(rem[rem.length - 2], rem[rem.length - 1]);\n for (i = iMin; i <= iMax; i++) {\n let selectedCount = $(\"#cantoViewBody\").find(\".single-image .icon-s-Ok2_32\").length;\n if (selectedCount >= 20) {\n $(\".max-select-tips\").fadeIn(\"normal\").delay(2000).fadeOut(1000);\n return;\n }\n $(\".single-image:eq(\" + i + \") .select-box\").addClass(\"icon-s-Ok2_32\");\n $(\".single-image:eq(\" + i + \")\").addClass(\"selected\");\n }\n } else {\n let selectedCount = $(\"#cantoViewBody\").find(\".single-image .icon-s-Ok2_32\").length;\n if (selectedCount >= 20) {\n if (!$(this).hasClass(\"icon-s-Ok2_32\")) {\n $(\".max-select-tips\").fadeIn(\"normal\").delay(2000).fadeOut(1000);\n }\n $(this).removeClass(\"icon-s-Ok2_32\");\n $(this).closest(\".single-image\").removeClass(\"selected\");\n return;\n } else {\n $(this).toggleClass(\"icon-s-Ok2_32\");\n $(this).closest(\".single-image\").toggleClass(\"selected\");\n }\n\n }\n handleSelectedMode();\n });\n imageResize();\n handleSelectedMode();\n\n let bodyHeight = $(\"#cantoImageBody\").height();\n let documentHeight = $(\"#imagesContent\").height();\n if (documentHeight < bodyHeight && !isLoadingComplete) {\n loadMoreAction();\n }\n}\n\nlet handleSelectedMode = function () {\n let selectedCount = $(\"#cantoViewBody\").find(\".single-image .icon-s-Ok2_32\").length;\n $(\"#cantoViewBody\").find(\"#selected-count\").html(selectedCount);\n if (selectedCount) {\n $(\"#cantoViewBody\").find(\"#globalSearch\").addClass(\"hidden\");\n $(\"#cantoViewBody\").find(\"#filterSection\").addClass(\"hidden\");\n $(\"#cantoViewBody\").find(\"#selectedCountSection\").removeClass(\"hidden\");\n $(\"#cantoViewBody\").find(\"#selectedActionSection\").removeClass(\"hidden\");\n $(\"#insertAlbumWrapper\").addClass(\"hidden\");\n } else {\n $(\"#cantoViewBody\").find(\"#globalSearch\").removeClass(\"hidden\");\n $(\"#cantoViewBody\").find(\"#filterSection\").removeClass(\"hidden\");\n $(\"#cantoViewBody\").find(\"#selectedCountSection\").addClass(\"hidden\");\n $(\"#cantoViewBody\").find(\"#selectedActionSection\").addClass(\"hidden\");\n $(\"#insertAlbumWrapper\").removeClass(\"hidden\");\n }\n //toggle isAllSelectedMode\n $(\"#cantoViewBody\").find(\"#selectAllBtn\").addClass(\"all-selected\");\n $(\"#cantoViewBody\").find(\"#selectAllBtn\").attr(\"title\", \"Deselect All\");\n};\nlet resetImageURL = function (id, url) {\n let imgDom = $(\"#cantoViewBody\").find(\"#\" + id);\n let data = \"data:image\" + url;\n imgDom.attr(\"src\", data);\n};\n\nfunction displayFullyImage(src) {\n let $viewImageModal = $(\"#cantoViewBody\").find(\"#viewImageModal\");\n let $pageMask = $(\"#cantoViewBody\").find(\"#pageMask\");\n $viewImageModal.find(\"img\").attr(\"src\", src);\n $(\"#cantoViewBody\").find(\".loading-icon\").addClass(\"hidden\");\n $viewImageModal.removeClass(\"hidden\");\n $pageMask.removeClass(\"hidden\");\n $(\"#cantoViewBody\").find('.view-image-modal .close-btn').off('click').on('click', function () {\n $viewImageModal.addClass(\"hidden\");\n $pageMask.addClass(\"hidden\");\n });\n}\n\n\nfunction imageDetail(detailData) {\n if (detailData) {\n $(\"#cantoViewBody\").find(\"#imageDetailModal_name\").html(detailData.name);\n $(\"#cantoViewBody\").find(\"#imageDetailModal_size\").html(detailData.size + \"KB\");\n $(\"#cantoViewBody\").find(\"#imageDetailModal_created\").html(dateHandler(detailData.created));\n $(\"#cantoViewBody\").find(\"#imageDetailModal_uploaded\").html(dateHandler(detailData.lastUploaded));\n $(\"#cantoViewBody\").find(\"#imageDetailModal_status\").html(detailData.approvalStatus);\n $(\"#cantoViewBody\").find(\"#insertIntoPostBtn\").data(\"downloadurl\", detailData.url.download);\n\n let $imageDetailModal = $(\"#cantoViewBody\").find(\"#imageDetailModal\");\n $(\"#cantoViewBody\").find(\".loading-icon\").addClass(\"hidden\");\n $imageDetailModal.removeClass(\"hidden\");\n $(\"#cantoViewBody\").find('#imageDetailModal .close-btn').off('click').on('click', function () {\n $imageDetailModal.addClass(\"hidden\");\n });\n }\n}\n\nfunction imageNewDetail(detailData) {\n let sliceString = function (string, dom, length) {\n if (!string) {\n $(dom).closest(\".detail-item\").addClass(\"hidden\");\n return \"Null\";\n } else {\n $(dom).closest(\".detail-item\").removeClass(\"hidden\");\n }\n if (!length) {\n length = 150;\n }\n if (string.length > length) {\n $(dom).removeClass(\"hidden\");\n return string.slice(0, length) + \"...\";\n } else {\n $(dom).addClass(\"hidden\");\n return string;\n }\n };\n if (detailData) {\n $(\"#cantoViewBody\").find(\"#imagebox_name\").html(detailData.name);\n $(\"#cantoViewBody\").find(\"#imagebox_size\").html(Math.round(detailData.size / 1024) + \"KB\");\n $(\"#cantoViewBody\").find(\"#imagebox_created\").html(detailData.metadata ? (detailData.metadata[\"Create Date\"] ? detailData.metadata[\"Create Date\"] : \" \") : \" \");\n $(\"#cantoViewBody\").find(\"#imagebox_uploaded\").html(dateHandler(detailData.lastUploaded));\n $(\"#cantoViewBody\").find(\"#imagebox_status\").html(detailData.approvalStatus);\n let copyrightMoreDom = $(\"#imagebox_copyright\").closest(\".detail-item\").find(\".more\");\n $(\"#cantoViewBody\").find(\"#imagebox_copyright\").html(sliceString(detailData.copyright, copyrightMoreDom, 177));\n $(\"#cantoViewBody\").find(\"#imagebox_copyright\").data(\"field\", detailData.copyright);\n let tactMoreDom = $(\"#imagebox_tac\").closest(\".detail-item\").find(\".more\");\n $(\"#cantoViewBody\").find(\"#imagebox_tac\").html(sliceString(detailData.termsAndConditions, tactMoreDom, 160));\n $(\"#cantoViewBody\").find(\"#imagebox_tac\").data(\"field\", detailData.termsAndConditions);\n $(\"#cantoViewBody\").find(\"#insertBtn\").data(\"id\", detailData.id);\n $(\"#cantoViewBody\").find(\"#insertBtn\").data(\"scheme\", detailData.scheme);\n }\n\n let $imageDetailModal = $(\"#cantoViewBody\").find(\"#imagePreviewModal\");\n $(\"#cantoViewBody\").find(\".loading-icon\").addClass(\"hidden\");\n $imageDetailModal.removeClass(\"hidden\");\n $(\"#cantoViewBody\").find('#imagePreviewModal .close-btn').off('click').on('click', function () {\n $imageDetailModal.addClass(\"hidden\");\n });\n $(\"#cantoViewBody\").find('#imagePreviewModal #cancelBtn').off('click').on('click', function () {\n $imageDetailModal.addClass(\"hidden\");\n });\n $(\"#cantoViewBody\").find('#imagePreviewModal .detail-item .more').off('click').on('click', function () {\n let text = $(this).closest(\".detail-item\").find(\".content\").data(\"field\");\n $(this).closest(\".detail-item\").find(\".content\").html(text);\n $(this).addClass(\"hidden\");\n });\n $(\"#cantoViewBody\").find('#imagePreviewModal #insertBtn').off('click').on('click', function () {\n $(\"#cantoViewBody\").find(\".loading-icon\").removeClass(\"hidden\");\n let assetArray = [\n {\n id: detailData.id,\n scheme: detailData.scheme,\n }\n ];\n cantoAPI.insertImage(assetArray);\n });\n}\n\nfunction dateHandler(str) {\n return str.substr(0, 4) + '-' + str.substr(4, 2) + '-'\n + str.substr(6, 2) + ' ' + str.substr(8, 2) + ':' + str.substr(10, 2);\n}\n\nfunction treeviewDataHandler() {\n cantoAPI.loadTree(treeviewController);\n}\n\nlet treeviewController = function (dummyData) {\n let html = \"\";\n html = treeviewFirstRender(dummyData);\n $(\"#cantoViewBody\").find(\"#treeviewContent\").append(html);\n $(\"#cantoViewBody\").find(\"#treeviewContent > ul\").animate({\n height: 'toggle'\n });\n\n};\nlet treeviewFirstRender = function (data) {\n let html = \"
    \";\n $.each(data, function (i, d) {\n let listclass = \" \";\n if (d.size == 0) {\n listclass = \"no-child\";\n } else if (d.scheme == \"folder\") {\n listclass = \"has-sub-folder\";\n }\n html += `
  • `;\n let iconStyle = \"icon-s-Folder_open-20px\";\n if (d.scheme == \"album\") {\n iconStyle = \"icon-s-Album-20px\";\n }\n html += `\n \"Loading\"\n ${d.name}\n
  • `;\n });\n html += \"
\";\n return html;\n};\nlet subTreeRender = function (data) {\n let html = treeviewRender(data);\n $(\"#cantoViewBody\").find(\".current-tree-node\").append(html);\n $(\"#cantoViewBody\").find(\".current-tree-node > ul\").animate({\n height: 'toggle'\n });\n $(\"#cantoViewBody\").find(\".current-tree-node\").find(\".folder-loading\").addClass(\"hidden\");\n $(\"#cantoViewBody\").find(\".current-tree-node\").find(\".icon-s-Folder_open-20px\").removeClass(\"hidden\");\n $(\"#cantoViewBody\").find(\".current-tree-node\").removeClass(\"current-tree-node\");\n};\nlet treeviewRender = function (data) {\n let html = \"
    \";\n $.each(data, function (i, d) {\n let listclass = \" \";\n if (d.size == 0) {\n listclass = \"no-child\";\n }\n html += `
  • `;\n let iconStyle = \"icon-s-Folder_open-20px\";\n if (d.scheme == \"album\") {\n iconStyle = \"icon-s-Album-20px\";\n }\n html += `\n ${d.name}`;\n if (d.children && d.children.length) {\n html += treeviewRender(d.children);\n }\n html += '
  • ';\n });\n html += \"
\";\n return html;\n};\n\nfunction imageResize() {\n let initCount = 8;\n // let totalWidth = totalWidth = Number($(\"#cantoViewBody\").find(\"#imagesContent\")[0].offsetWidth);\n let totalWidth = Number($(\"#cantoViewBody\").find(\"#imagesContent\")[0].offsetWidth);\n let singleImageWidth = 0;\n let getCountInALine = function (n) {\n singleImageWidth = Number((totalWidth - 8) / n - 2);\n if ((singleImageWidth >= 160) && (singleImageWidth <= 210)) {\n return singleImageWidth;\n } else if (singleImageWidth < 160) {\n n--;\n getCountInALine(n);\n } else if (singleImageWidth > 210) {\n n++;\n getCountInALine(n);\n }\n };\n let singleWidth = getCountInALine(initCount);\n $(\"#cantoViewBody\").find('.single-image').css(\"width\", singleWidth);\n}\n\n//scroll to load more\n\nfunction isScrollToPageBottom() {\n let bodyHeight = $(\"#cantoImageBody\").height();\n let documentHeight = $(\"#imagesContent\").height();\n let scrollHeight = $(\"#cantoImageBody\").scrollTop();\n let isToBottom = documentHeight - bodyHeight - scrollHeight < 0;\n let nowCount = $(\".single-image\").length == 0;\n return isToBottom && !nowCount;\n}\n\nfunction loadMoreHandler(limit) {\n let start = currentImageList.length == 0 ? 0 : apiNextStart;\n let filterString = \"sortBy=time&sortDirection=descending&limit=\" + limit + \"&start=\" + start;\n let imageCount = $(\".single-image\").length;\n if (imageCount !== 0) {\n $(\"#loadingMore\").fadeIn(\"slow\");\n } else {\n $(\"#cantoViewBody\").find(\"#imagesContent\").html(\"\");\n }\n return filterString;\n}\n\nfunction loadMoreAction() {\n if (searchedBy == \"bySearch\") {\n let value = $(\"#cantoViewBody\").find(\"#globalSearch input\").val();\n if (!value) {\n return;\n }\n let initSchme = $(\"#cantoViewBody\").find(\".type-font.current\").data(\"type\");\n let data = {};\n data.scheme = initSchme;\n data.keywords = value;\n cantoAPI.getFilterList(data, imageListDisplay);\n } else if (searchedBy == \"bytree\") {\n let albumId = $(\"#cantoViewBody\").find(\"#treeviewSection ul li\").find(\".selected\").data(\"id\");\n cantoAPI.getListByAlbum(albumId, imageListDisplay);\n } else {\n let initSchme = $(\"#cantoViewBody\").find(\".type-font.current\").data(\"type\");\n getImageInit(initSchme);\n }\n}\n\nfunction uploadFileToCanto(e) {\n let url = `https://${_tenants}/api/v1/upload/setting`;\n fetch(url, {\n method: \"GET\",\n headers: {\n \"Authorization\": `${_tokenType} ${_accessToken}`,\n \"Content-Type\": \"application/json; charset=utf-8\"\n },\n }).then(response => {\n return response.json();\n }).then(data => {\n const formData = new FormData();\n formData.append(\"key\", data.key);\n formData.append(\"acl\", data.acl);\n formData.append(\"AWSAccessKeyId\", data.AWSAccessKeyId);\n formData.append(\"Policy\", data.Policy);\n formData.append(\"Signature\", data.Signature);\n formData.append(\"x-amz-meta-file_name\", e.currentTarget.files[0].name);\n formData.append(\"x-amz-meta-tag\", \"\");\n formData.append(\"x-amz-meta-scheme\", \"\");\n formData.append(\"x-amz-meta-id\", \"\");\n formData.append(\"x-amz-meta-album_id\", selectedAlbum);\n formData.append(\"file\", e.currentTarget.files[0]);\n let statusBar = parent.document.querySelector(\".modal-status-bar\");\n\n fetch(data.url, {\n method: \"post\",\n body: formData,\n mode: \"no-cors\",\n redirect: 'follow'\n }).then(response => {\n document.getElementById(\"uploadBtn\").style.background = \"linear-gradient(16deg, rgb(205 101 1) 0%, rgb(169 218 0 / 100%) 100%)\";\n document.getElementById(\"uploadBtn\").value = \"Uploading image...\";\n }).catch(error => {\n console.log(error);\n }).finally(() => {\n document.getElementById(\"uploadBtn\").value = \"Upload complete - processing\";\n checkStatusInterval(e.currentTarget.files[0].name);\n });\n }).catch(error => {\n console.log(\"An error occurred while attempting to grab upload settings!\");\n console.log(error);\n });\n\n function checkStatusInterval(filename) {\n let url = `https://${_tenants}/api/v1/upload/status?hours=1`;\n let statusBar = parent.document.querySelector(\".modal-status-bar\");\n setInterval(() => {\n\n fetch(url, {\n method: \"get\",\n headers: {\"Authorization\": _tokenType + \" \" + _accessToken},\n }).then(response => {\n return response.json();\n }).then(body => {\n if (body.results && body.results.length > 0) {\n let results = body.results.filter(e => {\n if (e.name == filename && e.status != \"Done\") {\n return e;\n }\n });\n if (results.filter(e => e != undefined).length == 0) {\n document.getElementById(\"uploadBtn\").value = \"Canto processing complete! Reloading\";\n window.location.reload();\n }\n }\n }).catch(error => {\n console.log(\"an error occurred!\");\n console.log(error)\n });\n }, 5000);\n }\n\n}\n\nparent.document.querySelector(\".modal-status-bar\").style.display = \"none\";\n\n// Accept HMR as per: https://vitejs.dev/guide/api-hmr.html\nif (import.meta.hot) {\n import.meta.hot.accept(() => {\n console.log(\"HMR\")\n });\n}\n\n"],"names":["_accessToken","_tokenType","_tenants","cantoAPI","_APIHeaders","searchedBy","currentImageList","singleCountLoad","apiNextStart","isLoadingComplete","_formatDistrict","MAX_CONTENT_REQUEST_ITEMS","MAX_ALBUM_REQUEST_ITEMS","FILTER_BY_APPROVED","selectedAlbum","setToken","tokenInfo","callback","url","request","data","treeID","albumID","filterString","loadMoreHandler","previewURL","ID","scheme","contentID","targetWindow","buffer","albumId","start","result","response","imageArray","imageArraySubset","id","album","albumName","error","getFrameDom","addEventListener","getTokenInfo","event","treeviewDataHandler","initSchme","getImageInit","contentIframe","e","uploadFileToCanto","imageResize","imageListDisplay","handleSelectedMode","assetArray","selectedArray","i","obj","displayFullyImage","targetURL","targetID","imageNewDetail","childList","subTreeId","subTreeRender","value","isScrollToPageBottom","loadMoreAction","inputObj","imageListSection","imageList","formatArr","extension","html","disname","rem","nameTop","iMin","iMax","bodyHeight","selectedCount","src","$viewImageModal","$pageMask","detailData","sliceString","string","dom","length","dateHandler","copyrightMoreDom","tactMoreDom","$imageDetailModal","text","str","treeviewController","dummyData","treeviewFirstRender","d","listclass","iconStyle","treeviewRender","initCount","totalWidth","singleImageWidth","getCountInALine","n","singleWidth","documentHeight","scrollHeight","isToBottom","nowCount","limit","formData","checkStatusInterval","filename","body"],"mappings":"AACA,IAAIA,EAAe,GAEfC,EAAa,GACbC,EAAW,GACXC,EAAW,CAAA,EACXC,EAAc,CAAA,EACdC,EAAa,GACbC,EAAmB,CAAA,EACnBC,EAAkB,GAClBC,EAAe,EACfC,EAAoB,GACpBC,EAAkB,GACtB,MAAMC,EAA4B,IAC5BC,EAA0B,IAC1BC,EAAqB,qBAC3B,IAAIC,EAAgB,KAIpB,SAASC,EAASC,EAAW,CAC3BhB,EAAegB,EAAU,YACzBd,EAAWc,EAAU,OACRf,EAAAe,EAAU,UAAYA,EAAU,UAAY,SAC3CZ,EAAA,CACZ,cAAiBH,EAAa,IAAMD,EACpC,eAAgB,mCAAA,EAElBU,EAAkBM,EAAU,cAC9B,CAEAb,EAAS,SAAW,SAAUc,EAAU,CAClC,IAAAC,EAAM,WAAahB,EAAW,2DAClC,EAAE,KAAK,CACL,QAASE,EACT,KAAM,MACN,IAAAc,EACA,MAAO,GACP,MAAO,SAAUC,EAAS,CACxB,MAAM,iBAAiB,CACzB,EACA,QAAS,SAAUC,EAAM,CACvBH,EAASG,EAAK,OAAO,CACvB,CAAA,CACD,CACH,EACAjB,EAAS,YAAc,SAAUkB,EAAQJ,E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6DAA6D,EACzE,QAAQ,IAAIA,CAAK,CAAA,CAClB,EAED,SAAS0E,EAAoBC,EAAU,CACjCjG,IAAAA,EAAM,WAAWhB,CAAQ,gCACb,OAAO,SAAS,cAAc,mBAAmB,EACjE,YAAY,IAAM,CAEhB,MAAMgB,EAAK,CACT,OAAQ,MACR,QAAS,CAAC,cAAiBjB,EAAa,IAAMD,CAAY,CAAA,CAC3D,EAAE,KAAiBkC,GACXA,EAAS,MACjB,EAAE,KAAakF,GAAA,CACVA,EAAK,SAAWA,EAAK,QAAQ,OAAS,GAC1BA,EAAK,QAAQ,OAAOnE,GAAK,CACrC,GAAIA,EAAE,MAAQkE,GAAYlE,EAAE,QAAU,OAC7BA,OAAAA,CACT,CACD,EACW,OAAOA,GAAKA,GAAK,IAAS,EAAE,QAAU,IACvC,SAAA,eAAe,WAAW,EAAE,MAAQ,uCAC7C,OAAO,SAAS,SAEpB,CACD,EAAE,MAAeT,GAAA,CAChB,QAAQ,IAAI,oBAAoB,EAChC,QAAQ,IAAIA,CAAK,CAAA,CAClB,GACA,GAAI,CACT,CAEF,CAEA,OAAO,SAAS,cAAc,mBAAmB,EAAE,MAAM,QAAU"} \ No newline at end of file diff --git a/src/web/assets/dist/assets/canto-embed-DbXhLEGs.js.map.gz b/src/web/assets/dist/assets/canto-embed-DbXhLEGs.js.map.gz new file mode 100644 index 0000000..5001b5b Binary files /dev/null and b/src/web/assets/dist/assets/canto-embed-DbXhLEGs.js.map.gz differ diff --git a/src/web/assets/dist/assets/canto-embed-uVQc_jmE.js b/src/web/assets/dist/assets/canto-embed-uVQc_jmE.js deleted file mode 100644 index ffefc48..0000000 --- a/src/web/assets/dist/assets/canto-embed-uVQc_jmE.js +++ /dev/null @@ -1,11 +0,0 @@ -let g="",p="",m="",s={},f={},h="",u=[],k=50,b=0,r=!1,B="";const A=100,M=1e3,w="&approval=Approved";function _(e){g=e.accessToken,m=e.tenant,p=e.tokenType?e.tokenType:"bearer",f={Authorization:p+" "+g,"Content-Type":"application/x-www-form-urlencoded"},B=e.formatDistrict}s.loadTree=function(e){var a="https://"+m+"/api/v1/tree?sortBy=name&sortDirection=ascending&layer=1";$.ajax({headers:f,type:"GET",url:a,async:!0,error:function(n){alert("load tree error")},success:function(n){e(n.results)}})};s.loadSubTree=function(e,a){let n=`https://${m}/api/v1/tree/${e}`;$.ajax({headers:f,type:"GET",url:n,async:!0,error:function(t){alert("load tree error")},success:function(t){a(t.results)}})};s.getListByAlbum=function(e,a){if(r)return;let n=I(k),t=`https://${m}/api/v1/album/${e}?${n}${w}`;$.ajax({type:"GET",headers:f,url:t,async:!0,error:function(o){alert("load list error")},success:function(o){u.push.apply(u,o.results),o.start||(o.start=0),o.found-o.limit<=o.start?r=!0:r=!1,b=o.start+o.limit+1,$("#loadingMore").delay(1500).fadeOut("slow"),a(o.results)}})};s.getRedirectURL=function(e,a){if(!(e&&a))return;let n=e+"URI";$.ajax({type:"GET",headers:f,url:n,error:function(t){console.error(t.getError())},success:function(t){$("img#"+a).attr("src",t)}})};s.getHugeRedirectURL=function(e,a){if(!(e&&a))return;let n=`${e}URI/2000`;$.ajax({type:"GET",headers:f,url:n,error:function(t){console.error(t.getError())},success:function(t){$("#cantoViewBody").find("#imageBox").find("img").attr("src",t)}})};s.getListByScheme=function(e,a){if(e=="allfile"){let n={scheme:"allfile",keywords:""};s.getFilterList(n,a)}else{if(r)return;let n=I(k),t=`https://${m}/api/v1/${e}?${n}${w}`;$.ajax({type:"GET",headers:f,url:t,async:!1,error:function(o){alert("load list error")},success:function(o){u.push.apply(u,o.results),o.start||(o.start=0),o.found-o.limit<=o.start?r=!0:r=!1,b=o.start+o.limit+1,$("#loadingMore").delay(1500).fadeOut("slow"),a(o.results)}})}};s.getDetail=function(e,a,n){let t=`https://${m}/api/v1/${a}/${e}`;$.ajax({type:"GET",headers:f,url:t,async:!0,error:function(o){alert("load detail error")},success:function(o){n(o)}})};s.getFilterList=function(e,a){if(r)return;let n=I(k),t=`https://${m}/api/v1/search?${n}${w}`;t+=`&keyword=${e.keywords}`,e.scheme&&e.scheme=="allfile"?t+=`&scheme=${encodeURIComponent("image|presentation|document|audio|video|other")}`:e.scheme&&(t+=`&scheme=${e.scheme}`),$.ajax({type:"GET",headers:f,url:t,async:!1,error:function(o){alert("load List error")},success:function(o){u.push.apply(u,o.results),o.start||(o.start=0),o.found-o.limit<=o.start?r=!0:r=!1,b=o.start+o.limit+1,$("#loadingMore").delay(1500).fadeOut("slow"),a(o.results)}})};s.logout=function(){let e=parent,a={};a.type="cantoLogout",e.postMessage(a,"*")};s.paginatedAlbumRequest=async(e,a,n=0)=>{let t=`https://${m}/api/v1/album/${a}`,o=`sortBy=time&sortDirection=descending&limit=${M}&start=${n}${w}`,l=await fetch(`${t}?${o}`,{method:"get",headers:{Authorization:`${p} ${g}`,"Content-Type":"application/json; charset=utf-8"}}).then(c=>c.json());return e.push(...l.results),e.length{let t=`https://${m}/api/v1/batch/content?${w}`;const o=a.slice(n,n+A);let l=await fetch(t,{method:"post",headers:{Authorization:`${p} ${g}`,"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(o)}).then(c=>c.json());return e.push(...l.docResult),e.length{let n=a.length===1?a[0].id:0,t=$("#treeviewSection").find("li.selected");const o=t.data("id");let l=t.find("span").text(),d={type:"closeModal",cantoId:n,cantoAlbumId:0,cantoAssetData:a,cantoAlbumData:{id:o,name:l}};parent.postMessage(d,"*")}).catch(a=>{console.error(a.message),data.type="cantoInsertImage",data.assetList=[],parent.postMessage(data,"*")})};s.insertAlbum=function(e,a){s.paginatedAlbumRequest([],e,0).then(n=>{let o={type:"closeModal",cantoId:0,cantoAlbumId:e,cantoAssetData:n,cantoAlbumData:{id:e,name:a}};parent.postMessage(o,"*")}).catch(n=>{console.error(n.message),data.type="cantoInsertImage",data.assetList=[],parent.postMessage(data,"*")})};$(document).ready(function(){z(),q(),E(),window.addEventListener("message",e=>{let a=e.data;a&&a.accessToken&&a.accessToken.length>0?_(a):_({accessToken:parent.document.querySelector(".canto-uc-subiframe").dataset.access,tenant:parent.document.querySelector(".canto-uc-subiframe").dataset.tenant}),F();let n=$("#cantoViewBody").find(".type-font.current").data("type");$("#cantoViewBody").find("#globalSearch input").val(""),C(n)})});function E(){let e=parent,a={};a.type="getTokenInfo",e.postMessage(a,"*")}function z(){let e=document.getElementsByClassName("canto-uc-subiframe")[0];e&&e.contentDocument}function q(){document.addEventListener("sendTokenInfo",function(n){let t=n.data;g=t.accessToken,t.refreshToken,p=t.tokenType}),$(document).off("click").on("change","#uploadBtnInvisible",n=>{W(n)}).on("click","#uploadBtn",n=>{document.querySelector("#uploadBtnInvisible").click()}).on("click","#treeviewSwitch",function(n){$("#treeviewSection").hasClass("expanded")?($("#treeviewSection").stop().animate({left:"-20%"}),$("#cantoImageBody").stop().animate({width:"100%",left:"0"},v),$("#treeviewSection").removeClass("expanded"),$("#loadingMore").addClass("no-treeview"),$("#noItem").addClass("no-treeview"),$(".max-select-tips").addClass("no-treeview")):($("#treeviewSection").stop().animate({left:"0px"}),$("#cantoImageBody").stop().animate({width:"80%",left:"20%"},v),$("#treeviewSection").addClass("expanded"),$("#loadingMore").removeClass("no-treeview"),$("#noItem").removeClass("no-treeview"),$(".max-select-tips").removeClass("no-treeview"))}).on("click",".type-font",function(n){h="byScheme",$(".type-font").removeClass("current"),$(this).addClass("current"),$("#cantoViewBody").find("#globalSearch input").val(""),$("#cantoViewBody").find("#treeviewSection ul li").removeClass("selected");let t={};t.scheme=$("#cantoViewBody").find(".type-font.current").data("type"),t.keywords="",$("#cantoViewBody").find("#imagesContent").html(""),$("#cantoViewBody").find("#imagesContent").scrollTop(0),r=!1,u=[],s.getFilterList(t,y)}).on("click","#selectAllBtn",function(n){$("#cantoViewBody").find(".single-image .select-box").removeClass("icon-s-Ok2_32"),$("#cantoViewBody").find(".single-image").removeClass("selected"),T()}).on("click","#insertAssetsBtn",function(n){$("#cantoViewBody").find(".loading-icon").removeClass("hidden");let t=[],o=$("#cantoViewBody").find(".single-image .icon-s-Ok2_32").closest(".single-image");for(let l=0;l0))return;let a=[];B&&B.length>1&&(a=B.split(";"));for(let c=0;c150&&(x=d.name.substr(0,142)+"..."+d.name.substr(-5)),S+=`
- ${d.scheme} -
-
${x}
- -
`,$("#cantoViewBody").find("#imagesContent").append(S),s.getRedirectURL(d.url.preview,d.id)}$("#cantoViewBody").find(".single-image").length==0?$("#cantoViewBody").find("#noItem").removeClass("hidden"):$("#cantoViewBody").find("#noItem").addClass("hidden");let t=[];$("#cantoViewBody").find(".single-image").hover(function(){let c=$(this).height()-$(this).find(".single-image-name").height()-20;$(this).find(".single-image-name").stop().animate({top:c})},function(){$(this).find(".single-image-name").stop().animate({top:"100%"})}),$("#cantoViewBody").find(".single-image .select-box").off("click").on("click",function(c){if(c.cancelBubble=!0,c.stopPropagation(),c.preventDefault(),t.push($(".single-image").index($(this).closest(".single-image"))),c.shiftKey){let d=Math.min(t[t.length-2],t[t.length-1]),V=Math.max(t[t.length-2],t[t.length-1]);for(i=d;i<=V;i++){if($("#cantoViewBody").find(".single-image .icon-s-Ok2_32").length>=20){$(".max-select-tips").fadeIn("normal").delay(2e3).fadeOut(1e3);return}$(".single-image:eq("+i+") .select-box").addClass("icon-s-Ok2_32"),$(".single-image:eq("+i+")").addClass("selected")}}else if($("#cantoViewBody").find(".single-image .icon-s-Ok2_32").length>=20){$(this).hasClass("icon-s-Ok2_32")||$(".max-select-tips").fadeIn("normal").delay(2e3).fadeOut(1e3),$(this).removeClass("icon-s-Ok2_32"),$(this).closest(".single-image").removeClass("selected");return}else $(this).toggleClass("icon-s-Ok2_32"),$(this).closest(".single-image").toggleClass("selected");T()}),v(),T();let o=$("#cantoImageBody").height();$("#imagesContent").height()l?($(o).removeClass("hidden"),t.slice(0,l)+"..."):($(o).addClass("hidden"),t)};if(e){$("#cantoViewBody").find("#imagebox_name").html(e.name),$("#cantoViewBody").find("#imagebox_size").html(Math.round(e.size/1024)+"KB"),$("#cantoViewBody").find("#imagebox_created").html(e.metadata&&e.metadata["Create Date"]?e.metadata["Create Date"]:" "),$("#cantoViewBody").find("#imagebox_uploaded").html(j(e.lastUploaded)),$("#cantoViewBody").find("#imagebox_status").html(e.approvalStatus);let t=$("#imagebox_copyright").closest(".detail-item").find(".more");$("#cantoViewBody").find("#imagebox_copyright").html(a(e.copyright,t,177)),$("#cantoViewBody").find("#imagebox_copyright").data("field",e.copyright);let o=$("#imagebox_tac").closest(".detail-item").find(".more");$("#cantoViewBody").find("#imagebox_tac").html(a(e.termsAndConditions,o,160)),$("#cantoViewBody").find("#imagebox_tac").data("field",e.termsAndConditions),$("#cantoViewBody").find("#insertBtn").data("id",e.id),$("#cantoViewBody").find("#insertBtn").data("scheme",e.scheme)}let n=$("#cantoViewBody").find("#imagePreviewModal");$("#cantoViewBody").find(".loading-icon").addClass("hidden"),n.removeClass("hidden"),$("#cantoViewBody").find("#imagePreviewModal .close-btn").off("click").on("click",function(){n.addClass("hidden")}),$("#cantoViewBody").find("#imagePreviewModal #cancelBtn").off("click").on("click",function(){n.addClass("hidden")}),$("#cantoViewBody").find("#imagePreviewModal .detail-item .more").off("click").on("click",function(){let t=$(this).closest(".detail-item").find(".content").data("field");$(this).closest(".detail-item").find(".content").html(t),$(this).addClass("hidden")}),$("#cantoViewBody").find("#imagePreviewModal #insertBtn").off("click").on("click",function(){$("#cantoViewBody").find(".loading-icon").removeClass("hidden");let t=[{id:e.id,scheme:e.scheme}];s.insertImage(t)})}function j(e){return e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2)+" "+e.substr(8,2)+":"+e.substr(10,2)}function F(){s.loadTree(U)}let U=function(e){let a="";a=P(e),$("#cantoViewBody").find("#treeviewContent").append(a),$("#cantoViewBody").find("#treeviewContent > ul").animate({height:"toggle"})},P=function(e){let a="
    ";return $.each(e,function(n,t){let o=" ";t.size==0?o="no-child":t.scheme=="folder"&&(o="has-sub-folder"),a+=`
  • `;let l="icon-s-Folder_open-20px";t.scheme=="album"&&(l="icon-s-Album-20px"),a+=` - - ${t.name} -
  • `}),a+="
",a},H=function(e){let a=L(e);$("#cantoViewBody").find(".current-tree-node").append(a),$("#cantoViewBody").find(".current-tree-node > ul").animate({height:"toggle"}),$("#cantoViewBody").find(".current-tree-node").find(".folder-loading").addClass("hidden"),$("#cantoViewBody").find(".current-tree-node").find(".icon-s-Folder_open-20px").removeClass("hidden"),$("#cantoViewBody").find(".current-tree-node").removeClass("current-tree-node")},L=function(e){let a="
    ";return $.each(e,function(n,t){let o=" ";t.size==0&&(o="no-child"),a+=`
  • `;let l="icon-s-Folder_open-20px";t.scheme=="album"&&(l="icon-s-Album-20px"),a+=` - ${t.name}`,t.children&&t.children.length&&(a+=L(t.children)),a+="
  • "}),a+="
",a};function v(){let e=8,a=Number($("#cantoViewBody").find("#imagesContent")[0].offsetWidth),n=0,t=function(l){if(n=Number((a-8)/l-2),n>=160&&n<=210)return n;n<160?(l--,t(l)):n>210&&(l++,t(l))},o=t(e);$("#cantoViewBody").find(".single-image").css("width",o)}function N(){let e=$("#cantoImageBody").height(),a=$("#imagesContent").height(),n=$("#cantoImageBody").scrollTop(),t=a-e-n<0,o=$(".single-image").length==0;return t&&!o}function I(e){let a=u.length==0?0:b,n="sortBy=time&sortDirection=descending&limit="+e+"&start="+a;return $(".single-image").length!==0?$("#loadingMore").fadeIn("slow"):$("#cantoViewBody").find("#imagesContent").html(""),n}function R(){if(h=="bySearch"){let e=$("#cantoViewBody").find("#globalSearch input").val();if(!e)return;let a=$("#cantoViewBody").find(".type-font.current").data("type"),n={};n.scheme=a,n.keywords=e,s.getFilterList(n,y)}else if(h=="bytree"){let e=$("#cantoViewBody").find("#treeviewSection ul li").find(".selected").data("id");s.getListByAlbum(e,y)}else{let e=$("#cantoViewBody").find(".type-font.current").data("type");C(e)}}function W(e){let a=`https://${m}/api/v1/upload/setting`;fetch(a,{method:"GET",headers:{Authorization:`${p} ${g}`,"Content-Type":"application/json; charset=utf-8"}}).then(t=>t.json()).then(t=>{const o=new FormData;o.append("key",t.key),o.append("acl",t.acl),o.append("AWSAccessKeyId",t.AWSAccessKeyId),o.append("Policy",t.Policy),o.append("Signature",t.Signature),o.append("x-amz-meta-file_name",e.currentTarget.files[0].name),o.append("x-amz-meta-tag",""),o.append("x-amz-meta-scheme",""),o.append("x-amz-meta-id",""),o.append("x-amz-meta-album_id",""),o.append("file",e.currentTarget.files[0]),parent.document.querySelector(".modal-status-bar"),fetch(t.url,{method:"post",body:o,mode:"no-cors",redirect:"follow"}).then(l=>{document.getElementById("uploadBtn").style.background="linear-gradient(16deg, rgb(205 101 1) 0%, rgb(169 218 0 / 100%) 100%)",document.getElementById("uploadBtn").value="Uploading image..."}).catch(l=>{console.log(l)}).finally(()=>{document.getElementById("uploadBtn").value="Upload complete - processing",n(e.currentTarget.files[0].name)})}).catch(t=>{console.log("An error occurred while attempting to grab upload settings!"),console.log(t)});function n(t){let o=`https://${m}/api/v1/upload/status?hours=1`;parent.document.querySelector(".modal-status-bar"),setInterval(()=>{fetch(o,{method:"get",headers:{Authorization:p+" "+g}}).then(l=>l.json()).then(l=>{l.results&&l.results.length>0&&l.results.filter(d=>{if(d.name==t&&d.status!="Done")return d}).filter(d=>d!=null).length==0&&(document.getElementById("uploadBtn").value="Canto processing complete! Reloading",window.location.reload())}).catch(l=>{console.log("an error occurred!"),console.log(l)})},5e3)}}parent.document.querySelector(".modal-status-bar").style.display="none"; -//# sourceMappingURL=canto-embed-uVQc_jmE.js.map diff --git a/src/web/assets/dist/assets/canto-embed-uVQc_jmE.js.gz b/src/web/assets/dist/assets/canto-embed-uVQc_jmE.js.gz deleted file mode 100644 index d1ac2c8..0000000 Binary files a/src/web/assets/dist/assets/canto-embed-uVQc_jmE.js.gz and /dev/null differ diff --git a/src/web/assets/dist/assets/canto-embed-uVQc_jmE.js.map b/src/web/assets/dist/assets/canto-embed-uVQc_jmE.js.map deleted file mode 100644 index 87c6154..0000000 --- a/src/web/assets/dist/assets/canto-embed-uVQc_jmE.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"canto-embed-uVQc_jmE.js","sources":["../../../../../buildchain/src/js/canto-embed.js"],"sourcesContent":["let cantoViewDom = {};\nlet _accessToken = \"\";\nlet _refreshToken = \"\";\nlet _tokenType = \"\";\nlet _tenants = \"\";\nlet cantoAPI = {};\nlet _APIHeaders = {};\nlet searchedBy = \"\"; //bySearch bytree byScheme''\nlet currentImageList = [];\nlet singleCountLoad = 50;\nlet apiNextStart = 0;\nlet isLoadingComplete = false;\nlet _formatDistrict = '';\nconst MAX_CONTENT_REQUEST_ITEMS = 100;\nconst MAX_ALBUM_REQUEST_ITEMS = 1000;\nconst FILTER_BY_APPROVED = \"&approval=Approved\";\n\n/* -----------------canto API start-------------------------------------------------------------*/\n\nfunction setToken(tokenInfo) {\n _accessToken = tokenInfo.accessToken;\n _tenants = tokenInfo.tenant;\n _tokenType = tokenInfo.tokenType ? tokenInfo.tokenType : \"bearer\";\n _APIHeaders = {\n \"Authorization\": _tokenType + \" \" + _accessToken,\n \"Content-Type\": \"application/x-www-form-urlencoded\"\n };\n _formatDistrict = tokenInfo.formatDistrict;\n}\n\n// \"https://rubin.canto.com/api/v1/tree?sortBy=name&sortDirection=ascending&layer=1\ncantoAPI.loadTree = function (callback) {\n var url = \"https://\" + _tenants + \"/api/v1/tree?sortBy=name&sortDirection=ascending&layer=1\";\n $.ajax({\n headers: _APIHeaders,\n type: \"GET\",\n url: url,\n async: true,\n error: function (request) {\n alert(\"load tree error\");\n },\n success: function (data) {\n callback(data.results);\n }\n });\n};\ncantoAPI.loadSubTree = function (treeID, callback) {\n let url = `https://${_tenants}/api/v1/tree/${treeID}`;\n $.ajax({\n headers: _APIHeaders,\n type: \"GET\",\n url: url,\n async: true,\n error: function (request) {\n alert(\"load tree error\");\n },\n success: function (data) {\n callback(data.results);\n }\n });\n};\ncantoAPI.getListByAlbum = function (albumID, callback) {\n if (isLoadingComplete) {\n return;\n }\n let filterString = loadMoreHandler(singleCountLoad);\n let url = `https://${_tenants}/api/v1/album/${albumID}?${filterString}${FILTER_BY_APPROVED}`;\n $.ajax({\n type: \"GET\",\n headers: _APIHeaders,\n url: url,\n async: true,\n error: function (request) {\n alert(\"load list error\");\n },\n success: function (data) {\n currentImageList.push.apply(currentImageList, data.results);\n if (!data.start) {\n data.start = 0;\n }\n if (data.found - data.limit <= data.start) {\n isLoadingComplete = true;\n } else {\n isLoadingComplete = false;\n }\n apiNextStart = data.start + data.limit + 1;\n $(\"#loadingMore\").delay(1500).fadeOut(\"slow\");\n callback(data.results);\n }\n });\n};\ncantoAPI.getRedirectURL = function (previewURL, ID) {\n if (!(previewURL && ID)) return;\n let url = previewURL + 'URI';\n $.ajax({\n type: \"GET\",\n headers: _APIHeaders,\n url: url,\n error: function (request) {\n console.error(request.getError());\n },\n success: function (data) {\n $(\"img#\" + ID).attr('src', data);\n }\n });\n};\ncantoAPI.getHugeRedirectURL = function (previewURL, ID) {\n if (!(previewURL && ID)) return;\n let url = `${previewURL}URI/2000`;\n $.ajax({\n type: \"GET\",\n headers: _APIHeaders,\n url: url,\n error: function (request) {\n console.error(request.getError());\n },\n success: function (data) {\n let $viewImageModal = $(\"#cantoViewBody\").find(\"#imageBox\");\n $viewImageModal.find(\"img\").attr(\"src\", data);\n }\n });\n};\n\n\ncantoAPI.getListByScheme = function (scheme, callback) {\n if (scheme == \"allfile\") {\n let data = {scheme: \"allfile\", keywords: \"\"};\n cantoAPI.getFilterList(data, callback);\n } else {\n if (isLoadingComplete) {\n return;\n }\n let filterString = loadMoreHandler(singleCountLoad);\n let url = `https://${_tenants}/api/v1/${scheme}?${filterString}${FILTER_BY_APPROVED}`;\n $.ajax({\n type: \"GET\",\n headers: _APIHeaders,\n url: url,\n async: false,\n error: function (request) {\n alert(\"load list error\");\n },\n success: function (data) {\n currentImageList.push.apply(currentImageList, data.results);\n if (!data.start) {\n data.start = 0;\n }\n if (data.found - data.limit <= data.start) {\n isLoadingComplete = true;\n } else {\n isLoadingComplete = false;\n }\n apiNextStart = data.start + data.limit + 1;\n $(\"#loadingMore\").delay(1500).fadeOut(\"slow\");\n callback(data.results);\n }\n });\n }\n\n};\n\ncantoAPI.getDetail = function (contentID, scheme, callback) {\n let url = `https://${_tenants}/api/v1/${scheme}/${contentID}`;\n $.ajax({\n type: \"GET\",\n headers: _APIHeaders,\n url: url,\n async: true,\n error: function (request) {\n alert(\"load detail error\");\n },\n success: function (data) {\n callback(data);\n }\n });\n};\n\ncantoAPI.getFilterList = function (data, callback) {\n if (isLoadingComplete) {\n return;\n }\n let filterString = loadMoreHandler(singleCountLoad);\n let url = `https://${_tenants}/api/v1/search?${filterString}${FILTER_BY_APPROVED}`;\n url += `&keyword=${data.keywords}`;\n if (data.scheme && data.scheme == \"allfile\") {\n url += `&scheme=${encodeURIComponent(\"image|presentation|document|audio|video|other\")}`;\n } else if (data.scheme) {\n url += `&scheme=${data.scheme}`;\n }\n $.ajax({\n type: \"GET\",\n headers: _APIHeaders,\n url: url,\n async: false,\n error: function (request) {\n alert(\"load List error\");\n },\n success: function (data) {\n currentImageList.push.apply(currentImageList, data.results);\n if (!data.start) {\n data.start = 0;\n }\n if (data.found - data.limit <= data.start) {\n isLoadingComplete = true;\n } else {\n isLoadingComplete = false;\n }\n apiNextStart = data.start + data.limit + 1;\n $(\"#loadingMore\").delay(1500).fadeOut(\"slow\");\n callback(data.results);\n }\n });\n};\n\ncantoAPI.logout = function () {\n //clear cookie and trun to login page.\n let targetWindow = parent;\n let data = {};\n data.type = \"cantoLogout\";\n targetWindow.postMessage(data, '*');\n};\n\n/**\n * Retrieve all of the assets from the albumId album, paginated to handle API limits\n *\n * @param {[]} buffer\n * @param {string} albumId\n * @param {number} start\n * @returns {Promise<*>}\n */\ncantoAPI.paginatedAlbumRequest = async (buffer, albumId, start = 0) => {\n let url = `https://${_tenants}/api/v1/album/${albumId}`;\n let filterString = `sortBy=time&sortDirection=descending&limit=${MAX_ALBUM_REQUEST_ITEMS}&start=${start}${FILTER_BY_APPROVED}`;\n let result = await fetch(`${url}?${filterString}`, {\n method: \"get\",\n headers: {\n \"Authorization\": `${_tokenType} ${_accessToken}`,\n \"Content-Type\": \"application/json; charset=utf-8\"\n },\n }).then((response) => {\n return response.json();\n });\n buffer.push(...result['results']);\n if (buffer.length < result.found) {\n return cantoAPI.paginatedAlbumRequest(buffer, albumId, start + MAX_ALBUM_REQUEST_ITEMS);\n } else {\n return buffer;\n }\n}\n\n/**\n * Retrieve all of the assets in the imageArray array, paginated to handle API limits\n *\n * @param {[]} buffer\n * @param {{id: string, scheme: string}[]} imageArray\n * @param {number} start\n * @returns {Promise<*>}\n */\ncantoAPI.paginatedContentRequest = async (buffer, imageArray, start = 0) => {\n let url = `https://${_tenants}/api/v1/batch/content?${FILTER_BY_APPROVED}`;\n const imageArraySubset = imageArray.slice(start, start + MAX_CONTENT_REQUEST_ITEMS);\n let result = await fetch(url, {\n method: \"post\",\n headers: {\n \"Authorization\": `${_tokenType} ${_accessToken}`,\n \"Content-Type\": \"application/json; charset=utf-8\"\n },\n body: JSON.stringify(imageArraySubset)\n }).then((response) => {\n return response.json();\n });\n buffer.push(...result['docResult']);\n if (buffer.length < imageArray.length) {\n return cantoAPI.paginatedContentRequest(buffer, imageArray, start + MAX_CONTENT_REQUEST_ITEMS);\n } else {\n return buffer;\n }\n}\n\n/**\n * Insert the images in imageArray into the CMS\n *\n * @param {{id: string, scheme: string}[]} imageArray\n */\ncantoAPI.insertImage = function (imageArray) {\n if (!(imageArray && imageArray.length)) {\n return;\n }\n cantoAPI.paginatedContentRequest([], imageArray, 0).then((response) => {\n // Get the id of the canto asset, or 0 if it is a collection of images\n let id = response.length === 1 ? response[0].id : 0;\n // Gather information about the selected album\n let album = $(\"#treeviewSection\").find(\"li.selected\");\n const albumId = album.data('id');\n let albumName = album.find('span').text();\n const albumData = {\n id: albumId,\n name: albumName,\n };\n // Compose the payload to send as an event\n let data = {\n type: \"closeModal\",\n // The id of the canto asset, or 0 if it not a single image selection\n cantoId: id,\n // The id of the album, or 0 if it not a full album selection\n cantoAlbumId: 0,\n cantoAssetData: response,\n cantoAlbumData: albumData,\n };\n // Let our canto-field.js know what asset(s) were picked\n parent.postMessage(data, '*');\n }).catch((error) => {\n console.error(error.message);\n data.type = \"cantoInsertImage\";\n data.assetList = [];\n parent.postMessage(data, '*');\n });\n};\n\n/**\n * Insert the images in imageArray into the CMS\n *\n * @param {string} albumId\n * @param {string} albumName\n */\ncantoAPI.insertAlbum = function (albumId, albumName) {\n cantoAPI.paginatedAlbumRequest([], albumId, 0).then((response) => {\n // Gather information about the selected album\n const albumData = {\n id: albumId,\n name: albumName,\n };\n // Compose the payload to send as an event\n let data = {\n type: \"closeModal\",\n // The id of the canto asset, or 0 if it not a single image selection\n cantoId: 0,\n // The id of the album, or 0 if it not a full album selection\n cantoAlbumId: albumId,\n cantoAssetData: response,\n cantoAlbumData: albumData,\n };\n // Let our canto-field.js know what asset(s) were picked\n parent.postMessage(data, '*');\n }).catch((error) => {\n console.error(error.message);\n data.type = \"cantoInsertImage\";\n data.assetList = [];\n parent.postMessage(data, '*');\n });\n};\n\n/* -----------------canto API end--------------------------------------------------------*/\n\n$(document).ready(function () {\n getFrameDom();\n addEventListener();\n getTokenInfo();\n\n window.addEventListener(\"message\", (event) => {\n let tokenInfo = event.data;\n\n if (tokenInfo && tokenInfo.accessToken && tokenInfo.accessToken.length > 0) {\n setToken(tokenInfo);\n } else {\n setToken({\n accessToken: parent.document.querySelector(\".canto-uc-subiframe\").dataset.access,\n tenant: parent.document.querySelector(\".canto-uc-subiframe\").dataset.tenant,\n });\n }\n treeviewDataHandler();\n let initSchme = $(\"#cantoViewBody\").find(\".type-font.current\").data(\"type\");\n $(\"#cantoViewBody\").find(\"#globalSearch input\").val(\"\");\n getImageInit(initSchme);\n });\n\n\n});\n\nfunction getTokenInfo() {\n let targetWindow = parent;\n let data = {};\n data.type = \"getTokenInfo\";\n targetWindow.postMessage(data, '*');\n}\n\nfunction getFrameDom() {\n let parentDocument = document;\n let contentIframe = document.getElementsByClassName('canto-uc-subiframe')[0];\n if (contentIframe) {\n parentDocument = contentIframe.contentDocument;\n }\n cantoViewDom = parentDocument;\n}\n\nfunction addEventListener() {\n document.addEventListener('sendTokenInfo', function (e) {\n let tokenInfo = e.data;\n _accessToken = tokenInfo.accessToken;\n _refreshToken = tokenInfo.refreshToken;\n _tokenType = tokenInfo.tokenType;\n });\n\n $(document).off('click').on(\"change\", \"#uploadBtnInvisible\", (e) => {\n uploadFileToCanto(e);\n })\n .on(\"click\", \"#uploadBtn\", (e) => {\n document.querySelector(\"#uploadBtnInvisible\").click();\n })\n .on(\"click\", \"#treeviewSwitch\", function (e) {\n if ($('#treeviewSection').hasClass(\"expanded\")) {\n $('#treeviewSection').stop().animate({\n left: '-20%'\n });\n $('#cantoImageBody').stop().animate({\n width: '100%',\n left: '0'\n }, imageResize);\n $('#treeviewSection').removeClass(\"expanded\");\n $(\"#loadingMore\").addClass(\"no-treeview\");\n $(\"#noItem\").addClass(\"no-treeview\");\n $(\".max-select-tips\").addClass(\"no-treeview\");\n } else {\n $('#treeviewSection').stop().animate({\n left: '0px'\n });\n $('#cantoImageBody').stop().animate({\n width: '80%',\n left: '20%'\n }, imageResize);\n $('#treeviewSection').addClass(\"expanded\");\n $(\"#loadingMore\").removeClass(\"no-treeview\");\n $(\"#noItem\").removeClass(\"no-treeview\");\n $(\".max-select-tips\").removeClass(\"no-treeview\");\n }\n\n })\n .on(\"click\", \".type-font\", function (e) {\n searchedBy = \"byScheme\";\n $(\".type-font\").removeClass(\"current\");\n $(this).addClass(\"current\");\n // let type = $(this).data(\"type\");\n $(\"#cantoViewBody\").find(\"#globalSearch input\").val(\"\");\n $(\"#cantoViewBody\").find(\"#treeviewSection ul li\").removeClass(\"selected\");\n\n let data = {};\n data.scheme = $(\"#cantoViewBody\").find(\".type-font.current\").data(\"type\");\n data.keywords = \"\";\n $(\"#cantoViewBody\").find(\"#imagesContent\").html(\"\");\n $(\"#cantoViewBody\").find(\"#imagesContent\").scrollTop(0);\n isLoadingComplete = false;\n currentImageList = [];\n cantoAPI.getFilterList(data, imageListDisplay);\n\n })\n .on(\"click\", \"#selectAllBtn\", function (e) {\n $(\"#cantoViewBody\").find('.single-image .select-box').removeClass(\"icon-s-Ok2_32\");\n $(\"#cantoViewBody\").find(\".single-image\").removeClass(\"selected\");\n handleSelectedMode();\n })\n .on(\"click\", \"#insertAssetsBtn\", function (e) {\n $(\"#cantoViewBody\").find(\".loading-icon\").removeClass(\"hidden\");\n let assetArray = [];\n let selectedArray = $(\"#cantoViewBody\").find(\".single-image .icon-s-Ok2_32\").closest(\".single-image\");\n for (let i = 0; i < selectedArray.length; i++) {\n let obj = {};\n obj.id = $(selectedArray[i]).data(\"id\");\n obj.scheme = $(selectedArray[i]).data(\"scheme\");\n assetArray.push(obj);\n }\n cantoAPI.insertImage(assetArray);\n })\n // Allow for the insertion of the entire album into the target system\n .on(\"click\", \"#insertAlbumBtn\", function (e) {\n $(\"#cantoViewBody\").find(\".loading-icon\").removeClass(\"hidden\");\n let album = $(\"#treeviewSection\").find(\"li.selected\");\n const albumId = album.data('id');\n let albumName = album.find('span').text();\n cantoAPI.insertAlbum(albumId, albumName);\n })\n .on(\"click\", \".icon-s-Fullscreen\", function (e) {\n e.cancelBubble = true;\n e.stopPropagation();\n e.preventDefault();\n $(\"#cantoViewBody\").find(\".loading-icon\").removeClass(\"hidden\");\n let targetURL = $(e.currentTarget).closest(\".single-image\").data(\"xurl\");\n let previewURL = targetURL + \"?Authorization=\" + _accessToken;\n displayFullyImage(previewURL);\n })\n .on(\"click\", \".single-image\", function (e) {\n $(\"#cantoViewBody\").find(\".loading-icon\").removeClass(\"hidden\");\n //display image\n let targetURL = $(e.currentTarget).closest(\".single-image\").data(\"xurl\");\n let targetID = $(e.currentTarget).closest(\".single-image\").data(\"id\");\n cantoAPI.getHugeRedirectURL(targetURL, targetID);\n //display detail\n let id = $(this).data(\"id\");\n let scheme = $(this).data(\"scheme\");\n cantoAPI.getDetail(id, scheme, imageNewDetail);\n })\n .on(\"click\", \"#logoutBtn\", function (e) {\n $(\".loading-icon\").removeClass(\"hidden\");\n cantoAPI.logout();\n })\n //treeview event\n .on(\"click\", \"#treeviewSection ul li\", function (e) {\n e.cancelBubble = true;\n e.stopPropagation();\n e.preventDefault();\n let childList = $(e.currentTarget).children(\"ul\");\n // childList.toggleClass(\"hidden\");\n if (\"treeviewContent\" == $(e.currentTarget)[0].id) {\n //load init image list.\n $(\"#cantoViewBody\").find(\"#globalSearch input\").val(\"\");\n $(\"#cantoViewBody\").find(\"#treeviewSection ul li\").removeClass(\"selected\");\n $(\"#cantoViewBody\").find(\".type-font\").removeClass(\"current\");\n $(\"#cantoViewBody\").find(\"#imagesContent\").html(\"\");\n $(\"#cantoViewBody\").find(\"#imagesContent\").scrollTop(0);\n currentImageList = [];\n searchedBy = \"\";\n isLoadingComplete = false;\n getImageInit(\"allfile\");\n\n } else if (childList && childList.length) {\n childList.animate({\n height: 'toggle'\n });\n } else if ($(e.currentTarget).hasClass(\"has-sub-folder\")) {\n let subTreeId = $(e.currentTarget).data(\"id\");\n $(e.currentTarget).addClass(\"current-tree-node\");\n $(e.currentTarget).find(\".folder-loading\").removeClass(\"hidden\");\n $(e.currentTarget).find(\".icon-s-Folder_open-20px\").addClass(\"hidden\");\n cantoAPI.loadSubTree(subTreeId, subTreeRender);\n\n } else {\n $(\"#treeviewSection ul li\").removeClass(\"selected\");\n $(\"#cantoViewBody\").find(\".type-font\").removeClass(\"current\");\n $(\"#insertAlbumWrapper\").removeClass(\"hidden\");\n $(e.currentTarget).addClass(\"selected\");\n $(\"#cantoViewBody\").find(\"#globalSearch input\").val(\"\");\n $(\"#cantoViewBody\").find(\"#imagesContent\").html(\"\");\n $(\"#cantoViewBody\").find(\"#imagesContent\").scrollTop(0);\n currentImageList = [];\n isLoadingComplete = false;\n searchedBy = \"bytree\";\n let albumId = $(e.currentTarget).data(\"id\");\n cantoAPI.getListByAlbum(albumId, imageListDisplay);\n }\n\n })\n .on(\"click\", \"#globalSearchBtn\", function (e) {\n let value = $(\"#cantoViewBody\").find(\"#globalSearch input\").val();\n if (!value) {\n //load init image list.\n $(\"#cantoViewBody\").find(\"#treeviewSection ul li\").removeClass(\"selected\");\n let initSchme = $(\"#cantoViewBody\").find(\".type-font.current\").data(\"type\");\n $(\"#cantoViewBody\").find(\"#globalSearch input\").val(\"\");\n $(\"#cantoViewBody\").find(\"#imagesContent\").html(\"\");\n $(\"#cantoViewBody\").find(\"#imagesContent\").scrollTop(0);\n currentImageList = [];\n searchedBy = \"\";\n isLoadingComplete = false;\n getImageInit(initSchme);\n }\n searchedBy = \"bySearch\";\n isLoadingComplete = false;\n $(\"#cantoViewBody\").find(\"#treeviewSection ul li\").removeClass(\"selected\");\n $(\"#cantoViewBody\").find(\".type-font\").removeClass(\"current\");\n let initSchme = $(\"#cantoViewBody\").find(\".type-font.current\").data(\"type\");\n let data = {};\n data.scheme = initSchme;\n data.keywords = value;\n $(\"#cantoViewBody\").find(\"#imagesContent\").html(\"\");\n $(\"#cantoViewBody\").find(\"#imagesContent\").scrollTop(0);\n currentImageList = [];\n cantoAPI.getFilterList(data, imageListDisplay);\n });\n $(\"#cantoViewBody\").find(\"#cantoImageBody\").on(\"scroll\", function () {\n if (isScrollToPageBottom() && !isLoadingComplete) {\n loadMoreAction();\n }\n });\n\n let inputObj = $(\"#cantoViewBody\").find(\"#globalSearch input\");\n $(inputObj).bind('keyup', function (event) {\n if (event.keyCode == \"13\") {\n $(\"#cantoViewBody\").find('#globalSearchBtn').click();\n }\n });\n\n let imageListSection = $(\"#cantoViewBody\").find(\"#cantoImageBody\");\n $(imageListSection).resize(function () {\n imageResize();\n });\n}\n\nfunction getImageInit(scheme) {\n cantoAPI.getListByScheme(scheme, imageListDisplay);\n}\n\nfunction imageListDisplay(imageList) {\n if (!(imageList && imageList.length > 0)) {\n return;\n }\n let formatArr = [];\n if (_formatDistrict && _formatDistrict.length > 1) {\n formatArr = _formatDistrict.split(\";\");\n }\n for (let i = 0; i < imageList.length; i++) {\n let d = imageList[i];\n let extension = d.name.substring(d.name.lastIndexOf('.') + 1);\n if (formatArr.length && !formatArr.includes(extension)) {\n continue;\n }\n let html = \"\";\n let disname = d.name;\n if (d.name.length > 150) {\n disname = d.name.substr(0, 142) + '...' + d.name.substr(-5);\n }\n html += `
\n \"${d.scheme}\"\n
\n
${disname}
\n \n
`;\n $(\"#cantoViewBody\").find(\"#imagesContent\").append(html);\n cantoAPI.getRedirectURL(d.url.preview, d.id);\n }\n let currentCount = $(\"#cantoViewBody\").find('.single-image').length;\n if (currentCount == 0) {\n $(\"#cantoViewBody\").find(\"#noItem\").removeClass(\"hidden\");\n } else {\n $(\"#cantoViewBody\").find(\"#noItem\").addClass(\"hidden\");\n }\n let rem = [];\n $(\"#cantoViewBody\").find('.single-image').hover(function () {\n let nameTop = $(this).height() - $(this).find(\".single-image-name\").height() - 20;\n $(this).find('.single-image-name').stop().animate({top: nameTop});\n }, function () {\n $(this).find('.single-image-name').stop().animate({top: '100%'});\n });\n $(\"#cantoViewBody\").find('.single-image .select-box').off('click').on('click', function (e) {\n e.cancelBubble = true;\n e.stopPropagation();\n e.preventDefault();\n\n rem.push($(\".single-image\").index($(this).closest(\".single-image\")));\n if (e.shiftKey) {\n let iMin = Math.min(rem[rem.length - 2], rem[rem.length - 1]);\n let iMax = Math.max(rem[rem.length - 2], rem[rem.length - 1]);\n for (i = iMin; i <= iMax; i++) {\n let selectedCount = $(\"#cantoViewBody\").find(\".single-image .icon-s-Ok2_32\").length;\n if (selectedCount >= 20) {\n $(\".max-select-tips\").fadeIn(\"normal\").delay(2000).fadeOut(1000);\n return;\n }\n $(\".single-image:eq(\" + i + \") .select-box\").addClass(\"icon-s-Ok2_32\");\n $(\".single-image:eq(\" + i + \")\").addClass(\"selected\");\n }\n } else {\n let selectedCount = $(\"#cantoViewBody\").find(\".single-image .icon-s-Ok2_32\").length;\n if (selectedCount >= 20) {\n if (!$(this).hasClass(\"icon-s-Ok2_32\")) {\n $(\".max-select-tips\").fadeIn(\"normal\").delay(2000).fadeOut(1000);\n }\n $(this).removeClass(\"icon-s-Ok2_32\");\n $(this).closest(\".single-image\").removeClass(\"selected\");\n return;\n } else {\n $(this).toggleClass(\"icon-s-Ok2_32\");\n $(this).closest(\".single-image\").toggleClass(\"selected\");\n }\n\n }\n handleSelectedMode();\n });\n imageResize();\n handleSelectedMode();\n\n let bodyHeight = $(\"#cantoImageBody\").height();\n let documentHeight = $(\"#imagesContent\").height();\n if (documentHeight < bodyHeight && !isLoadingComplete) {\n loadMoreAction();\n }\n}\n\nlet handleSelectedMode = function () {\n let selectedCount = $(\"#cantoViewBody\").find(\".single-image .icon-s-Ok2_32\").length;\n $(\"#cantoViewBody\").find(\"#selected-count\").html(selectedCount);\n if (selectedCount) {\n $(\"#cantoViewBody\").find(\"#globalSearch\").addClass(\"hidden\");\n $(\"#cantoViewBody\").find(\"#filterSection\").addClass(\"hidden\");\n $(\"#cantoViewBody\").find(\"#selectedCountSection\").removeClass(\"hidden\");\n $(\"#cantoViewBody\").find(\"#selectedActionSection\").removeClass(\"hidden\");\n $(\"#insertAlbumWrapper\").addClass(\"hidden\");\n } else {\n $(\"#cantoViewBody\").find(\"#globalSearch\").removeClass(\"hidden\");\n $(\"#cantoViewBody\").find(\"#filterSection\").removeClass(\"hidden\");\n $(\"#cantoViewBody\").find(\"#selectedCountSection\").addClass(\"hidden\");\n $(\"#cantoViewBody\").find(\"#selectedActionSection\").addClass(\"hidden\");\n $(\"#insertAlbumWrapper\").removeClass(\"hidden\");\n }\n //toggle isAllSelectedMode\n $(\"#cantoViewBody\").find(\"#selectAllBtn\").addClass(\"all-selected\");\n $(\"#cantoViewBody\").find(\"#selectAllBtn\").attr(\"title\", \"Deselect All\");\n};\nlet resetImageURL = function (id, url) {\n let imgDom = $(\"#cantoViewBody\").find(\"#\" + id);\n let data = \"data:image\" + url;\n imgDom.attr(\"src\", data);\n};\n\nfunction displayFullyImage(src) {\n let $viewImageModal = $(\"#cantoViewBody\").find(\"#viewImageModal\");\n let $pageMask = $(\"#cantoViewBody\").find(\"#pageMask\");\n $viewImageModal.find(\"img\").attr(\"src\", src);\n $(\"#cantoViewBody\").find(\".loading-icon\").addClass(\"hidden\");\n $viewImageModal.removeClass(\"hidden\");\n $pageMask.removeClass(\"hidden\");\n $(\"#cantoViewBody\").find('.view-image-modal .close-btn').off('click').on('click', function () {\n $viewImageModal.addClass(\"hidden\");\n $pageMask.addClass(\"hidden\");\n });\n}\n\n\nfunction imageDetail(detailData) {\n if (detailData) {\n $(\"#cantoViewBody\").find(\"#imageDetailModal_name\").html(detailData.name);\n $(\"#cantoViewBody\").find(\"#imageDetailModal_size\").html(detailData.size + \"KB\");\n $(\"#cantoViewBody\").find(\"#imageDetailModal_created\").html(dateHandler(detailData.created));\n $(\"#cantoViewBody\").find(\"#imageDetailModal_uploaded\").html(dateHandler(detailData.lastUploaded));\n $(\"#cantoViewBody\").find(\"#imageDetailModal_status\").html(detailData.approvalStatus);\n $(\"#cantoViewBody\").find(\"#insertIntoPostBtn\").data(\"downloadurl\", detailData.url.download);\n\n let $imageDetailModal = $(\"#cantoViewBody\").find(\"#imageDetailModal\");\n $(\"#cantoViewBody\").find(\".loading-icon\").addClass(\"hidden\");\n $imageDetailModal.removeClass(\"hidden\");\n $(\"#cantoViewBody\").find('#imageDetailModal .close-btn').off('click').on('click', function () {\n $imageDetailModal.addClass(\"hidden\");\n });\n }\n}\n\nfunction imageNewDetail(detailData) {\n let sliceString = function (string, dom, length) {\n if (!string) {\n $(dom).closest(\".detail-item\").addClass(\"hidden\");\n return \"Null\";\n } else {\n $(dom).closest(\".detail-item\").removeClass(\"hidden\");\n }\n if (!length) {\n length = 150;\n }\n if (string.length > length) {\n $(dom).removeClass(\"hidden\");\n return string.slice(0, length) + \"...\";\n } else {\n $(dom).addClass(\"hidden\");\n return string;\n }\n };\n if (detailData) {\n $(\"#cantoViewBody\").find(\"#imagebox_name\").html(detailData.name);\n $(\"#cantoViewBody\").find(\"#imagebox_size\").html(Math.round(detailData.size / 1024) + \"KB\");\n $(\"#cantoViewBody\").find(\"#imagebox_created\").html(detailData.metadata ? (detailData.metadata[\"Create Date\"] ? detailData.metadata[\"Create Date\"] : \" \") : \" \");\n $(\"#cantoViewBody\").find(\"#imagebox_uploaded\").html(dateHandler(detailData.lastUploaded));\n $(\"#cantoViewBody\").find(\"#imagebox_status\").html(detailData.approvalStatus);\n let copyrightMoreDom = $(\"#imagebox_copyright\").closest(\".detail-item\").find(\".more\");\n $(\"#cantoViewBody\").find(\"#imagebox_copyright\").html(sliceString(detailData.copyright, copyrightMoreDom, 177));\n $(\"#cantoViewBody\").find(\"#imagebox_copyright\").data(\"field\", detailData.copyright);\n let tactMoreDom = $(\"#imagebox_tac\").closest(\".detail-item\").find(\".more\");\n $(\"#cantoViewBody\").find(\"#imagebox_tac\").html(sliceString(detailData.termsAndConditions, tactMoreDom, 160));\n $(\"#cantoViewBody\").find(\"#imagebox_tac\").data(\"field\", detailData.termsAndConditions);\n $(\"#cantoViewBody\").find(\"#insertBtn\").data(\"id\", detailData.id);\n $(\"#cantoViewBody\").find(\"#insertBtn\").data(\"scheme\", detailData.scheme);\n }\n\n let $imageDetailModal = $(\"#cantoViewBody\").find(\"#imagePreviewModal\");\n $(\"#cantoViewBody\").find(\".loading-icon\").addClass(\"hidden\");\n $imageDetailModal.removeClass(\"hidden\");\n $(\"#cantoViewBody\").find('#imagePreviewModal .close-btn').off('click').on('click', function () {\n $imageDetailModal.addClass(\"hidden\");\n });\n $(\"#cantoViewBody\").find('#imagePreviewModal #cancelBtn').off('click').on('click', function () {\n $imageDetailModal.addClass(\"hidden\");\n });\n $(\"#cantoViewBody\").find('#imagePreviewModal .detail-item .more').off('click').on('click', function () {\n let text = $(this).closest(\".detail-item\").find(\".content\").data(\"field\");\n $(this).closest(\".detail-item\").find(\".content\").html(text);\n $(this).addClass(\"hidden\");\n });\n $(\"#cantoViewBody\").find('#imagePreviewModal #insertBtn').off('click').on('click', function () {\n $(\"#cantoViewBody\").find(\".loading-icon\").removeClass(\"hidden\");\n let assetArray = [\n {\n id: detailData.id,\n scheme: detailData.scheme,\n }\n ];\n cantoAPI.insertImage(assetArray);\n });\n}\n\nfunction dateHandler(str) {\n return str.substr(0, 4) + '-' + str.substr(4, 2) + '-'\n + str.substr(6, 2) + ' ' + str.substr(8, 2) + ':' + str.substr(10, 2);\n}\n\nfunction treeviewDataHandler() {\n cantoAPI.loadTree(treeviewController);\n}\n\nlet treeviewController = function (dummyData) {\n let html = \"\";\n html = treeviewFirstRender(dummyData);\n $(\"#cantoViewBody\").find(\"#treeviewContent\").append(html);\n $(\"#cantoViewBody\").find(\"#treeviewContent > ul\").animate({\n height: 'toggle'\n });\n\n};\nlet treeviewFirstRender = function (data) {\n let html = \"
    \";\n $.each(data, function (i, d) {\n let listclass = \" \";\n if (d.size == 0) {\n listclass = \"no-child\";\n } else if (d.scheme == \"folder\") {\n listclass = \"has-sub-folder\";\n }\n html += `
  • `;\n let iconStyle = \"icon-s-Folder_open-20px\";\n if (d.scheme == \"album\") {\n iconStyle = \"icon-s-Album-20px\";\n }\n html += `\n \"Loading\"\n ${d.name}\n
  • `;\n });\n html += \"
\";\n return html;\n};\nlet subTreeRender = function (data) {\n let html = treeviewRender(data);\n $(\"#cantoViewBody\").find(\".current-tree-node\").append(html);\n $(\"#cantoViewBody\").find(\".current-tree-node > ul\").animate({\n height: 'toggle'\n });\n $(\"#cantoViewBody\").find(\".current-tree-node\").find(\".folder-loading\").addClass(\"hidden\");\n $(\"#cantoViewBody\").find(\".current-tree-node\").find(\".icon-s-Folder_open-20px\").removeClass(\"hidden\");\n $(\"#cantoViewBody\").find(\".current-tree-node\").removeClass(\"current-tree-node\");\n};\nlet treeviewRender = function (data) {\n let html = \"
    \";\n $.each(data, function (i, d) {\n let listclass = \" \";\n if (d.size == 0) {\n listclass = \"no-child\";\n }\n html += `
  • `;\n let iconStyle = \"icon-s-Folder_open-20px\";\n if (d.scheme == \"album\") {\n iconStyle = \"icon-s-Album-20px\";\n }\n html += `\n ${d.name}`;\n if (d.children && d.children.length) {\n html += treeviewRender(d.children);\n }\n html += '
  • ';\n });\n html += \"
\";\n return html;\n};\n\nfunction imageResize() {\n let initCount = 8;\n // let totalWidth = totalWidth = Number($(\"#cantoViewBody\").find(\"#imagesContent\")[0].offsetWidth);\n let totalWidth = Number($(\"#cantoViewBody\").find(\"#imagesContent\")[0].offsetWidth);\n let singleImageWidth = 0;\n let getCountInALine = function (n) {\n singleImageWidth = Number((totalWidth - 8) / n - 2);\n if ((singleImageWidth >= 160) && (singleImageWidth <= 210)) {\n return singleImageWidth;\n } else if (singleImageWidth < 160) {\n n--;\n getCountInALine(n);\n } else if (singleImageWidth > 210) {\n n++;\n getCountInALine(n);\n }\n };\n let singleWidth = getCountInALine(initCount);\n $(\"#cantoViewBody\").find('.single-image').css(\"width\", singleWidth);\n}\n\n//scroll to load more\n\nfunction isScrollToPageBottom() {\n let bodyHeight = $(\"#cantoImageBody\").height();\n let documentHeight = $(\"#imagesContent\").height();\n let scrollHeight = $(\"#cantoImageBody\").scrollTop();\n let isToBottom = documentHeight - bodyHeight - scrollHeight < 0;\n let nowCount = $(\".single-image\").length == 0;\n return isToBottom && !nowCount;\n}\n\nfunction loadMoreHandler(limit) {\n let start = currentImageList.length == 0 ? 0 : apiNextStart;\n let filterString = \"sortBy=time&sortDirection=descending&limit=\" + limit + \"&start=\" + start;\n let imageCount = $(\".single-image\").length;\n if (imageCount !== 0) {\n $(\"#loadingMore\").fadeIn(\"slow\");\n } else {\n $(\"#cantoViewBody\").find(\"#imagesContent\").html(\"\");\n }\n return filterString;\n}\n\nfunction loadMoreAction() {\n if (searchedBy == \"bySearch\") {\n let value = $(\"#cantoViewBody\").find(\"#globalSearch input\").val();\n if (!value) {\n return;\n }\n let initSchme = $(\"#cantoViewBody\").find(\".type-font.current\").data(\"type\");\n let data = {};\n data.scheme = initSchme;\n data.keywords = value;\n cantoAPI.getFilterList(data, imageListDisplay);\n } else if (searchedBy == \"bytree\") {\n let albumId = $(\"#cantoViewBody\").find(\"#treeviewSection ul li\").find(\".selected\").data(\"id\");\n cantoAPI.getListByAlbum(albumId, imageListDisplay);\n } else {\n let initSchme = $(\"#cantoViewBody\").find(\".type-font.current\").data(\"type\");\n getImageInit(initSchme);\n }\n}\n\nfunction uploadFileToCanto(e) {\n let url = `https://${_tenants}/api/v1/upload/setting`;\n fetch(url, {\n method: \"GET\",\n headers: {\n \"Authorization\": `${_tokenType} ${_accessToken}`,\n \"Content-Type\": \"application/json; charset=utf-8\"\n },\n }).then(response => {\n return response.json();\n }).then(data => {\n const formData = new FormData();\n formData.append(\"key\", data.key);\n formData.append(\"acl\", data.acl);\n formData.append(\"AWSAccessKeyId\", data.AWSAccessKeyId);\n formData.append(\"Policy\", data.Policy);\n formData.append(\"Signature\", data.Signature);\n formData.append(\"x-amz-meta-file_name\", e.currentTarget.files[0].name);\n formData.append(\"x-amz-meta-tag\", \"\");\n formData.append(\"x-amz-meta-scheme\", \"\");\n formData.append(\"x-amz-meta-id\", \"\");\n formData.append(\"x-amz-meta-album_id\", \"\");\n formData.append(\"file\", e.currentTarget.files[0]);\n let statusBar = parent.document.querySelector(\".modal-status-bar\");\n\n fetch(data.url, {\n method: \"post\",\n body: formData,\n mode: \"no-cors\",\n redirect: 'follow'\n }).then(response => {\n document.getElementById(\"uploadBtn\").style.background = \"linear-gradient(16deg, rgb(205 101 1) 0%, rgb(169 218 0 / 100%) 100%)\";\n document.getElementById(\"uploadBtn\").value = \"Uploading image...\";\n }).catch(error => {\n console.log(error);\n }).finally(() => {\n document.getElementById(\"uploadBtn\").value = \"Upload complete - processing\";\n checkStatusInterval(e.currentTarget.files[0].name);\n });\n }).catch(error => {\n console.log(\"An error occurred while attempting to grab upload settings!\");\n console.log(error);\n });\n\n function checkStatusInterval(filename) {\n let url = `https://${_tenants}/api/v1/upload/status?hours=1`;\n let statusBar = parent.document.querySelector(\".modal-status-bar\");\n setInterval(() => {\n\n fetch(url, {\n method: \"get\",\n headers: {\"Authorization\": _tokenType + \" \" + _accessToken},\n }).then(response => {\n return response.json();\n }).then(body => {\n if (body.results && body.results.length > 0) {\n let results = body.results.filter(e => {\n if (e.name == filename && e.status != \"Done\") {\n return e;\n }\n });\n if (results.filter(e => e != undefined).length == 0) {\n document.getElementById(\"uploadBtn\").value = \"Canto processing complete! Reloading\";\n window.location.reload();\n }\n }\n }).catch(error => {\n console.log(\"an error occurred!\");\n console.log(error)\n });\n }, 5000);\n }\n\n}\n\nparent.document.querySelector(\".modal-status-bar\").style.display = \"none\";\n\n// Accept HMR as per: https://vitejs.dev/guide/api-hmr.html\nif (import.meta.hot) {\n import.meta.hot.accept(() => {\n console.log(\"HMR\")\n });\n}\n\n"],"names":["_accessToken","_tokenType","_tenants","cantoAPI","_APIHeaders","searchedBy","currentImageList","singleCountLoad","apiNextStart","isLoadingComplete","_formatDistrict","MAX_CONTENT_REQUEST_ITEMS","MAX_ALBUM_REQUEST_ITEMS","FILTER_BY_APPROVED","setToken","tokenInfo","callback","url","request","data","treeID","albumID","filterString","loadMoreHandler","previewURL","ID","scheme","contentID","targetWindow","buffer","albumId","start","result","response","imageArray","imageArraySubset","id","album","albumName","error","getFrameDom","addEventListener","getTokenInfo","event","treeviewDataHandler","initSchme","getImageInit","contentIframe","e","uploadFileToCanto","imageResize","imageListDisplay","handleSelectedMode","assetArray","selectedArray","i","obj","displayFullyImage","targetURL","targetID","imageNewDetail","childList","subTreeId","subTreeRender","value","isScrollToPageBottom","loadMoreAction","inputObj","imageListSection","imageList","formatArr","extension","html","disname","rem","nameTop","iMin","iMax","bodyHeight","selectedCount","src","$viewImageModal","$pageMask","detailData","sliceString","string","dom","length","dateHandler","copyrightMoreDom","tactMoreDom","$imageDetailModal","text","str","treeviewController","dummyData","treeviewFirstRender","d","listclass","iconStyle","treeviewRender","initCount","totalWidth","singleImageWidth","getCountInALine","n","singleWidth","documentHeight","scrollHeight","isToBottom","nowCount","limit","formData","checkStatusInterval","filename","body"],"mappings":"AACA,IAAIA,EAAe,G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IAAI,oBAAoB,EAChC,QAAQ,IAAIA,CAAK,CAAA,CAClB,GACA,GAAI,CACT,CAEF,CAEA,OAAO,SAAS,cAAc,mBAAmB,EAAE,MAAM,QAAU"} \ No newline at end of file diff --git a/src/web/assets/dist/assets/canto-embed-uVQc_jmE.js.map.gz b/src/web/assets/dist/assets/canto-embed-uVQc_jmE.js.map.gz deleted file mode 100644 index 15eb0af..0000000 Binary files a/src/web/assets/dist/assets/canto-embed-uVQc_jmE.js.map.gz and /dev/null differ diff --git a/src/web/assets/dist/assets/canto-field-ehMCriUy.js b/src/web/assets/dist/assets/canto-field-CIyWJa6D.js similarity index 98% rename from src/web/assets/dist/assets/canto-field-ehMCriUy.js rename to src/web/assets/dist/assets/canto-field-CIyWJa6D.js index d12ecbf..b2a6f35 100644 --- a/src/web/assets/dist/assets/canto-field-ehMCriUy.js +++ b/src/web/assets/dist/assets/canto-field-CIyWJa6D.js @@ -14,4 +14,4 @@ `),A=new Garnish.Modal(w,{autoShow:!1});function D(a,n,m,h,o){let e={accessToken:h,tenant:p},l="https://oauth.canto.com/oauth/api/oauth2/universal2/authorize?response_type=code&app_id=52ff8ed9d6874d48a3bef9621bc1af26&redirect_uri=http://localhost:8080&state=abcd&code_challenge=1649285048042&code_challenge_method=plain";var i="/admin/_canto-dam-assets/canto-embed.twig";e.accessToken?(t(s).attr("data-element",n),t(s).attr("data-field",a),t(s).attr("data-type",m),t(s).attr("data-access",e.accessToken),t(s).attr("data-tenant",e.tenant),t(s).attr("src",i)):(t(s).attr("data-element",n),t(s).attr("data-field",a),t(s).attr("data-type",m),t(s).attr("src",l));function c(){const u=t(s).contents().find("body");u.removeClass("can-select-single can-select-multiple can-select-album"),u.addClass(o)}t(s).on("load",c),c()}function _(a){t.ajax({type:"GET",url:"https://oauth."+f+":443/oauth/api/oauth2/tenant/"+a.refreshToken,success:function(n){a.tenant=n,t(s).attr("src","/admin/_canto-dam-assets/canto-embed.twig")},error:function(){alert("Get tenant error")}})}})(jQuery);$(document).ready(function(){const t=new CustomEvent("vite-script-loaded",{detail:{path:"src/js/canto-field.js"}});document.dispatchEvent(t)}); -//# sourceMappingURL=canto-field-ehMCriUy.js.map +//# sourceMappingURL=canto-field-CIyWJa6D.js.map diff --git a/src/web/assets/dist/assets/canto-field-CIyWJa6D.js.gz b/src/web/assets/dist/assets/canto-field-CIyWJa6D.js.gz new file mode 100644 index 0000000..5e5c500 Binary files /dev/null and b/src/web/assets/dist/assets/canto-field-CIyWJa6D.js.gz differ diff --git a/src/web/assets/dist/assets/canto-field-CIyWJa6D.js.map b/src/web/assets/dist/assets/canto-field-CIyWJa6D.js.map new file mode 100644 index 0000000..10f648c --- /dev/null +++ b/src/web/assets/dist/assets/canto-field-CIyWJa6D.js.map @@ -0,0 +1 @@ +{"version":3,"file":"canto-field-CIyWJa6D.js","sources":["../../../../../buildchain/src/js/canto-field.js"],"sourcesContent":["/**\n * =====================================================================================================================\n * Refactored plugin code\n * =====================================================================================================================\n **/\n\n(function ($) {\n let tokenInfo = {},\n env,\n appId,\n tenantHostName,\n currentCantoTagID,\n formatDistrict;\n\n const pluginName = \"CantoDamConnector\",\n defaults = {\n env: \"canto.com\",\n };\n\n // Plugin constructor\n function Plugin(element, options) {\n this.element = element;\n\n this.options = $.extend({}, defaults, options);\n\n this._defaults = defaults;\n this._name = pluginName;\n\n this.init();\n }\n\n Plugin.prototype = {\n\n init: function () {\n\n $(() => {\n // this.options gives us access to the $jsonVars that our FieldType passed down to us\n settings(this.options);\n\n // Macro for getting a namespaced field selector\n const fieldNamespaceIdSelector = (fieldName) => '#' + this.options.prefix + '-' + Craft.namespaceId(fieldName, this.options.id);\n\n // Display the image preview on init\n const damAssetPreview = fieldNamespaceIdSelector('damAssetPreview');\n\n /**\n * Displays the image preview for the chosen Canto asset(s)\n */\n function displayImagePreview() {\n const damAssetPreviewWrapper = fieldNamespaceIdSelector('damAssetPreviewWrapper');\n $(damAssetPreviewWrapper).remove();\n if ($(damAssetPreview).attr(\"data-thumbnailurl\") == null ||\n $(damAssetPreview).attr(\"data-thumbnailurl\") == \"none\") {\n $(damAssetPreview).hide();\n } else {\n const url = $(damAssetPreview).attr(\"data-thumbnailurl\");\n const albumName = $(damAssetPreview).attr(\"data-albumName\");\n let name = $(damAssetPreview).attr(\"data-thumbnailName\");\n const assetCount = $(damAssetPreview).attr(\"data-assetCount\");\n const className = assetCount == 1 ? \"\" : \"canto-asset-preview-stack\";\n name = assetCount == 1 ? name : `${assetCount} images`;\n if (albumName.length) {\n name += ' / ' + albumName;\n }\n $(fieldNamespaceIdSelector('chooseAsset')).html(\"Choose a Different DAM Asset\");\n $(damAssetPreview).prepend(`\n
\n\n${name}
\n
\n`);\n }\n }\n\n function getTokenByVerifycode(verifyCode) {\n $.ajax({\n type: \"POST\",\n url: \"https://oauth.canto.com/oauth/api/oauth2/universal2/token\",\n dataType: \"json\",\n data: {\n \"app_id\": appId,\n \"grant_type\": \"authorization_code\",\n \"redirect_uri\": \"http://localhost:8080\",\n \"code\": verifyCode,\n \"code_verifier\": \"1649285048042\"\n },\n success: function (data) {\n tokenInfo = data;\n getTenant(tokenInfo);\n\n },\n error: function () {\n alert(\"Get token errorz\");\n }\n });\n }\n\n // Handle adding or changing an asset\n $(fieldNamespaceIdSelector('chooseAsset')).click((e) => {\n $modal.show();\n let fieldId = e.target.dataset.field;\n let elementId = e.target.dataset.element;\n let type = e.target.dataset.type;\n let accessToken = e.target.dataset.access;\n loadIframeContent(fieldId, elementId, type, accessToken, this.options.bodyClass);\n });\n\n // Handle clicks to remove the asset\n $(fieldNamespaceIdSelector('removeDamAsset')).click((e) => {\n // Hide the preview, and change the button name\n $(fieldNamespaceIdSelector('chooseAsset')).html(\"Add a DAM Asset\");\n $(damAssetPreview).hide();\n $(fieldNamespaceIdSelector('cantoId')).val(null);\n $(fieldNamespaceIdSelector('cantoAlbumId')).val(null);\n $(fieldNamespaceIdSelector('cantoAssetData')).val([]);\n $(fieldNamespaceIdSelector('cantoAlbumData')).val([]);\n });\n\n // Beginning of Canto's Universal Connector code:\n window.addEventListener(\"message\", (event) => {\n const data = event.data;\n // Onlu listen in if we are the target for this fieldId\n if ($(cantoUCFrame).attr(\"data-field\") != this.options.fieldId) {\n return;\n }\n if (data && data.type == \"getTokenInfo\") {\n var receiver = document.getElementById(cantoUCFrame.slice(1)).contentWindow;\n tokenInfo.formatDistrict = formatDistrict;\n tokenInfo.tenant = tenantHostName;\n receiver.postMessage(tokenInfo, '*');\n } else if (data && data.type == \"cantoLogout\") {\n tokenInfo = {};\n $(\".canto-uc-iframe-close-btn\").trigger(\"click\");\n\n } else if (data && data.type == \"cantoInsertImage\") {\n $(\".canto-uc-iframe-close-btn\").trigger(\"click\");\n callback(currentCantoTagID, data.assetList);\n\n } else if (data && data.type == \"closeModal\") {\n let cantoAsset = data.cantoAssetData[0];\n const assetCount = data.cantoAssetData.length;\n $(damAssetPreview).attr(\"data-assetCount\", assetCount);\n $(damAssetPreview).attr(\"data-thumbnailUrl\", cantoAsset.url.directUrlPreview);\n $(damAssetPreview).attr(\"data-thumbnailName\", cantoAsset.name);\n $(damAssetPreview).attr(\"data-albumName\", data.cantoAlbumData.name);\n displayImagePreview();\n // Save the cantoId & cantoAssetData into the hidden field data\n $(fieldNamespaceIdSelector('cantoId')).val(data.cantoId);\n $(fieldNamespaceIdSelector('cantoAlbumId')).val(data.cantoAlbumId);\n $(fieldNamespaceIdSelector('cantoAssetData')).val(JSON.stringify(data.cantoAssetData));\n $(fieldNamespaceIdSelector('cantoAlbumData')).val(JSON.stringify(data.cantoAlbumData));\n $(damAssetPreview).show();\n $modal.hide();\n\n } else if (data) {\n let verifyCode = data;\n getTokenByVerifycode(verifyCode);\n\n }\n\n });\n });\n }\n\n };\n\n // A really lightweight plugin wrapper around the constructor,\n // preventing against multiple instantiations\n $.fn[pluginName] = function (options) {\n return this.each(function () {\n if (!$.data(this, \"plugin_\" + pluginName)) {\n $.data(this, \"plugin_\" + pluginName,\n new Plugin(this, options));\n }\n });\n };\n\n function settings(options) {\n env = options.env;\n appId = options.appId;\n tenantHostName = options.tenantHostName;\n formatDistrict = options.extensions;\n }\n\n // The modal for the Canto picker\n const cantoUCFrame = '#cantoDamAssetsUCFrame';\n let modalMarkup = $(`\n
\n
\n
\n

Canto Assets

\n
\n \n
Uploading Image...
\n
\n
\n `);\n let $modal = new Garnish.Modal(modalMarkup, {'autoShow': false});\n\n /*--------------------------load iframe content---------------------------------------*/\n function loadIframeContent(fieldId, elementId, type, accessToken, bodyClass) {\n// let timeStamp = new Date().getTime();\n let tokenInfo = {\n accessToken: accessToken,\n tenant: tenantHostName,\n };\n let cantoLoginPage = \"https://oauth.canto.com/oauth/api/oauth2/universal2/authorize?response_type=code&app_id=\" + \"52ff8ed9d6874d48a3bef9621bc1af26\" + \"&redirect_uri=http://localhost:8080&state=abcd\" + \"&code_challenge=\" + \"1649285048042\" + \"&code_challenge_method=plain\";\n\n var cantoContentPage = \"/admin/_canto-dam-assets/canto-embed.twig\";\n if (tokenInfo.accessToken) {\n $(cantoUCFrame).attr(\"data-element\", elementId);\n $(cantoUCFrame).attr(\"data-field\", fieldId);\n $(cantoUCFrame).attr(\"data-type\", type);\n $(cantoUCFrame).attr(\"data-access\", tokenInfo.accessToken);\n $(cantoUCFrame).attr(\"data-tenant\", tokenInfo.tenant);\n $(cantoUCFrame).attr(\"src\", cantoContentPage);\n } else {\n $(cantoUCFrame).attr(\"data-element\", elementId);\n $(cantoUCFrame).attr(\"data-field\", fieldId);\n $(cantoUCFrame).attr(\"data-type\", type);\n $(cantoUCFrame).attr(\"src\", cantoLoginPage);\n }\n\n // Apply the feature classes for the iFrame immediately, and also after the iFrame as loaded\n function applyIFrameClasses() {\n const $iFrameBody = $(cantoUCFrame).contents().find(\"body\");\n $iFrameBody.removeClass('can-select-single can-select-multiple can-select-album');\n $iFrameBody.addClass(bodyClass);\n }\n\n $(cantoUCFrame).on(\"load\", applyIFrameClasses);\n applyIFrameClasses();\n }\n\n function getTenant(tokenInfo) {\n $.ajax({\n type: \"GET\",\n url: \"https://oauth.\" + env + \":443/oauth/api/oauth2/tenant/\" + tokenInfo.refreshToken,\n success: function (data) {\n tokenInfo.tenant = data;\n $(cantoUCFrame).attr(\"src\", \"/admin/_canto-dam-assets/canto-embed.twig\");\n },\n error: function () {\n alert(\"Get tenant error\");\n }\n });\n }\n\n})(jQuery, window, document);\n\n// Accept HMR as per: https://vitejs.dev/guide/api-hmr.html\nif (import.meta.hot) {\n import.meta.hot.accept(() => {\n console.log(\"HMR\")\n });\n}\n\n// Re-broadcast the custom `vite-script-loaded` event so that we know that this module has loaded\n// Needed because when