@salla.sa/twilight-components 2.14.349 → 2.14.351

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/dist/cjs/{Helper-B5NunIdR.js → Helper-DHRnzcFm.js} +14 -0
  2. package/dist/cjs/{filepond-DFhbfTkt.js → filepond-DmgB2usw.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-Dj4Zm459.js → filepond-plugin-file-poster-Qz9yBcC6.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-DsH6GzKJ.js → filepond-plugin-file-validate-size-BpxufYGC.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-DfaEudMs.js → filepond-plugin-file-validate-type-DPpMnDuU.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-gz-CV83v.js → filepond-plugin-image-edit-DSig_Hnr.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-DfkLjcpx.js → filepond-plugin-image-exif-orientation-BdyyWkN_.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-BxaEwNCI.js → filepond-plugin-image-preview-ClN5AjHL.js} +1 -1
  9. package/dist/cjs/{index-C9ymZIiv.js → index-ByiRU---.js} +1 -1
  10. package/dist/cjs/{index-DcTksD2K.js → index-wroCOFea.js} +2 -2
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/salla-accordion_62.cjs.entry.js +83 -52
  13. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-filters-widget.cjs.entry.js +2 -2
  21. package/dist/cjs/salla-filters.cjs.entry.js +2 -2
  22. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-notifications.cjs.entry.js +2 -2
  29. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-orders.cjs.entry.js +2 -2
  36. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-reviews-page.cjs.entry.js +2 -2
  40. package/dist/cjs/salla-reviews.cjs.entry.js +2 -2
  41. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  47. package/dist/cjs/twilight.cjs.js +2 -2
  48. package/dist/cjs/{vanilla-picker-BYDLZw1n.js → vanilla-picker-Dud2hHSp.js} +1 -1
  49. package/dist/collection/Helpers/Helper.js +14 -0
  50. package/dist/collection/components/salla-product-options/salla-product-options.js +44 -10
  51. package/dist/collection/components/salla-products-list/salla-products-list.js +9 -22
  52. package/dist/collection/components/salla-products-slider/salla-products-slider.js +9 -7
  53. package/dist/collection/components/salla-slider/salla-slider.js +15 -7
  54. package/dist/components/Helper.js +14 -0
  55. package/dist/components/index.js +2 -2
  56. package/dist/components/salla-product-options2.js +44 -10
  57. package/dist/components/salla-products-list2.js +7 -20
  58. package/dist/components/salla-products-slider2.js +7 -5
  59. package/dist/components/salla-slider2.js +15 -7
  60. package/dist/esm/{Helper-Bt5Zv9cl.js → Helper-B5RLi6Xo.js} +14 -0
  61. package/dist/esm/{filepond-DQR2YBu7.js → filepond-BcVCWOQQ.js} +1 -1
  62. package/dist/esm/{filepond-plugin-file-poster-XvYa1rlk.js → filepond-plugin-file-poster-B6OLqzjJ.js} +1 -1
  63. package/dist/esm/{filepond-plugin-file-validate-size-BRBnctOE.js → filepond-plugin-file-validate-size-BCifsMdp.js} +1 -1
  64. package/dist/esm/{filepond-plugin-file-validate-type-BuD6F1gi.js → filepond-plugin-file-validate-type-BzRNZ2wk.js} +1 -1
  65. package/dist/esm/{filepond-plugin-image-edit-BJ8YnBRL.js → filepond-plugin-image-edit-Dvu8RWud.js} +1 -1
  66. package/dist/esm/{filepond-plugin-image-exif-orientation-BGad_AoX.js → filepond-plugin-image-exif-orientation-DtlS_Id7.js} +1 -1
  67. package/dist/esm/{filepond-plugin-image-preview-Cb6UzPfa.js → filepond-plugin-image-preview-DRaZsLxF.js} +1 -1
  68. package/dist/esm/{index-DIfeuyTs.js → index-BT5aIJiI.js} +1 -1
  69. package/dist/esm/{index-Bhszo8cU.js → index-D8IUoDXw.js} +2 -2
  70. package/dist/esm/loader.js +3 -3
  71. package/dist/esm/salla-accordion_62.entry.js +83 -52
  72. package/dist/esm/salla-advertisement.entry.js +1 -1
  73. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  74. package/dist/esm/salla-apps-icons.entry.js +1 -1
  75. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  76. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  77. package/dist/esm/salla-contacts.entry.js +1 -1
  78. package/dist/esm/salla-custom-fields.entry.js +1 -1
  79. package/dist/esm/salla-filters-widget.entry.js +2 -2
  80. package/dist/esm/salla-filters.entry.js +2 -2
  81. package/dist/esm/salla-hook.entry.js +1 -1
  82. package/dist/esm/salla-installment.entry.js +1 -1
  83. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  84. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  85. package/dist/esm/salla-metadata.entry.js +1 -1
  86. package/dist/esm/salla-notification-item.entry.js +1 -1
  87. package/dist/esm/salla-notifications.entry.js +2 -2
  88. package/dist/esm/salla-offer.entry.js +1 -1
  89. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  90. package/dist/esm/salla-order-details-options.entry.js +1 -1
  91. package/dist/esm/salla-order-details.entry.js +1 -1
  92. package/dist/esm/salla-order-summary.entry.js +1 -1
  93. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  94. package/dist/esm/salla-orders.entry.js +2 -2
  95. package/dist/esm/salla-payments.entry.js +1 -1
  96. package/dist/esm/salla-price-range.entry.js +1 -1
  97. package/dist/esm/salla-review-card.entry.js +1 -1
  98. package/dist/esm/salla-reviews-page.entry.js +2 -2
  99. package/dist/esm/salla-reviews.entry.js +2 -2
  100. package/dist/esm/salla-social.entry.js +1 -1
  101. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  102. package/dist/esm/salla-tooltip.entry.js +1 -1
  103. package/dist/esm/salla-trust-badges.entry.js +1 -1
  104. package/dist/esm/salla-verify.entry.js +1 -1
  105. package/dist/esm/salla-wallet.entry.js +1 -1
  106. package/dist/esm/twilight.js +3 -3
  107. package/dist/esm/{vanilla-picker-C4Kwbr5L.js → vanilla-picker-BPR2c_5J.js} +1 -1
  108. package/dist/twilight/{p-0daa34c4.entry.js → p-0fb07494.entry.js} +1 -1
  109. package/dist/twilight/{p-5bb9ace5.entry.js → p-1d6ae0cd.entry.js} +1 -1
  110. package/dist/twilight/{p-a25fe3c1.entry.js → p-234d4270.entry.js} +1 -1
  111. package/dist/twilight/{p-f4bf39fb.entry.js → p-2986242d.entry.js} +1 -1
  112. package/dist/twilight/p-319d0ee6.entry.js +4 -0
  113. package/dist/twilight/{p-112e9574.entry.js → p-403fc5a0.entry.js} +1 -1
  114. package/dist/twilight/{p-574bd55f.entry.js → p-44c225e2.entry.js} +1 -1
  115. package/dist/twilight/{p-64c18854.entry.js → p-46095c81.entry.js} +1 -1
  116. package/dist/twilight/{p-66c5dcd3.entry.js → p-4a269d95.entry.js} +1 -1
  117. package/dist/twilight/{p-a6f250b8.entry.js → p-53bbd4e8.entry.js} +1 -1
  118. package/dist/twilight/{p-7a706d50.entry.js → p-5a27fc24.entry.js} +1 -1
  119. package/dist/twilight/{p-a5df8334.entry.js → p-5e83dab1.entry.js} +1 -1
  120. package/dist/twilight/{p-b0abcc89.entry.js → p-6961de25.entry.js} +1 -1
  121. package/dist/twilight/{p-ed0f40e2.entry.js → p-88aa8e1c.entry.js} +1 -1
  122. package/dist/twilight/{p-ae93ed50.entry.js → p-8af29c6e.entry.js} +1 -1
  123. package/dist/twilight/{p-de290cc2.entry.js → p-8d0e34f8.entry.js} +1 -1
  124. package/dist/twilight/{p-cc43a1bd.entry.js → p-97d6ac02.entry.js} +1 -1
  125. package/dist/twilight/{p-6222b0fa.entry.js → p-993dff37.entry.js} +1 -1
  126. package/dist/twilight/{p-004be2ff.entry.js → p-9a6195f6.entry.js} +1 -1
  127. package/dist/twilight/{p-129e02c2.entry.js → p-9ab1a8dd.entry.js} +1 -1
  128. package/dist/twilight/{p-af8daa75.entry.js → p-9dc0d7cb.entry.js} +1 -1
  129. package/dist/twilight/{p-DAM1DKLB.js → p-B1PME38e.js} +1 -1
  130. package/dist/twilight/{p-ByJhdNbq.js → p-BjevMNf5.js} +1 -1
  131. package/dist/twilight/{p-B-MyfVCv.js → p-CLCMzFCR.js} +1 -1
  132. package/dist/twilight/{p-Bhszo8cU.js → p-D8IUoDXw.js} +1 -1
  133. package/dist/twilight/{p-NTgp-Syt.js → p-DMvcLQlj.js} +1 -1
  134. package/dist/twilight/{p-CmuTtBET.js → p-DNuuIRPk.js} +1 -1
  135. package/dist/twilight/p-DgNC8L6e.js +4 -0
  136. package/dist/twilight/{p-CuNS5C_o.js → p-DhPpUonS.js} +1 -1
  137. package/dist/twilight/{p-BVmy-j16.js → p-R8UuPKQS.js} +1 -1
  138. package/dist/twilight/{p-BvldZUSR.js → p-VHxFG8vR.js} +1 -1
  139. package/dist/twilight/{p-9f541d63.entry.js → p-a0fb9e8d.entry.js} +1 -1
  140. package/dist/twilight/{p-48617181.entry.js → p-a50658ad.entry.js} +1 -1
  141. package/dist/twilight/{p-b8a203c1.entry.js → p-af71190f.entry.js} +1 -1
  142. package/dist/twilight/{p-f3d3e11e.entry.js → p-b4bb7b69.entry.js} +1 -1
  143. package/dist/twilight/{p-25f64b3e.entry.js → p-c5dc7685.entry.js} +1 -1
  144. package/dist/twilight/{p-1bfef164.entry.js → p-c8f83a29.entry.js} +1 -1
  145. package/dist/twilight/{p-55c9e7fe.entry.js → p-cef109da.entry.js} +1 -1
  146. package/dist/twilight/{p-60747f3b.entry.js → p-d8c30c7b.entry.js} +1 -1
  147. package/dist/twilight/{p-cadbe7b6.entry.js → p-de74f566.entry.js} +1 -1
  148. package/dist/twilight/{p-cc6238be.entry.js → p-eb109f9d.entry.js} +1 -1
  149. package/dist/twilight/{p-48df4495.entry.js → p-ef9334ed.entry.js} +1 -1
  150. package/dist/twilight/{p-46fb77ce.entry.js → p-faa4c75d.entry.js} +1 -1
  151. package/dist/twilight/{p-911bbc7d.entry.js → p-fad69d7b.entry.js} +1 -1
  152. package/dist/twilight/{p-307b5fa0.entry.js → p-ffcfb224.entry.js} +1 -1
  153. package/dist/twilight/{p-Cy9bcLMa.js → p-mIk_7HE4.js} +1 -1
  154. package/dist/twilight/twilight.esm.js +1 -1
  155. package/dist/types/Helpers/Helper.d.ts +2 -0
  156. package/dist/types/components/salla-products-list/salla-products-list.d.ts +1 -1
  157. package/dist/types/components/salla-products-slider/salla-products-slider.d.ts +1 -1
  158. package/dist/types/components/salla-slider/salla-slider.d.ts +4 -1
  159. package/dist/types/components.d.ts +4 -4
  160. package/package.json +5 -5
  161. package/dist/twilight/p-4fc33cee.entry.js +0 -4
  162. package/dist/twilight/p-Dljb4XCt.js +0 -4
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{d as i}from"./p-Bhszo8cU.js";function n(i,n){return n.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(t){if("default"!==t&&!(t in i)){var e=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(i,t,e.get?e:{enumerable:!0,get:function(){return n[t]}})}}))})),Object.freeze(i)}var t,e,o,E={exports:{}},r=t?E.exports:(t=1,E.exports=(e=function(i){return/^image/.test(i.type)},o=function(i){var n=i.addFilter,t=i.utils,o=t.Type,E=t.createRoute,r=t.createItemAPI,l=void 0===r?function(i){return i}:r,_=i.views.fileActionButton;n("SHOULD_REMOVE_ON_REVERT",(function(i,n){var t=n.item,o=n.query;return new Promise((function(i){var n=t.file;i(!(o("GET_ALLOW_IMAGE_EDIT")&&o("GET_IMAGE_EDIT_ALLOW_EDIT")&&e(n)))}))})),n("DID_LOAD_ITEM",(function(i,n){var t=n.query,o=n.dispatch;return new Promise((function(n,E){if(i.origin>1)n(i);else{var r=i.file;if(t("GET_ALLOW_IMAGE_EDIT")&&t("GET_IMAGE_EDIT_INSTANT_EDIT"))if(e(r)){var l=function(i,n,t){return function(e){a.shift(),e?n(i):t(i),o("KICK"),_()}},_=function(){if(a.length){var i=a[0],n=i.item;o("EDIT_ITEM",{id:n.id,handleEditorResponse:l(n,i.resolve,i.reject)})}};u({item:i,resolve:n,reject:E}),1===a.length&&_()}else n(i);else n(i)}}))})),n("DID_CREATE_ITEM",(function(i,n){var t=n.dispatch;i.extend("edit",(function(){t("EDIT_ITEM",{id:i.id})}))}));var a=[],u=function(i){return a.push(i),i};return n("CREATE_VIEW",(function(i){var n=i.is,t=i.view,o=i.query;if(o("GET_ALLOW_IMAGE_EDIT")){var r=o("GET_ALLOW_IMAGE_PREVIEW");if(n("file-info")&&!r||n("file")&&r){var a=o("GET_IMAGE_EDIT_EDITOR");if(a){a.filepondCallbackBridge||(a.outputData=!0,a.outputFile=!1,a.filepondCallbackBridge={onconfirm:a.onconfirm||function(){},oncancel:a.oncancel||function(){}});t.registerDestroyer((function(i){var n=i.root;n.ref.buttonEditItem&&n.ref.buttonEditItem.off("click",n.ref.handleEdit),n.ref.editButton&&n.ref.editButton.removeEventListener("click",n.ref.handleEdit)}));var u={EDIT_ITEM:function(i){var n=i.root,t=i.props.id,e=i.action.handleEditorResponse;a.cropAspectRatio=n.query("GET_IMAGE_CROP_ASPECT_RATIO")||a.cropAspectRatio,a.outputCanvasBackgroundColor=n.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR")||a.outputCanvasBackgroundColor;var o=n.query("GET_ITEM",t);if(o){var E=o.file,r=o.getMetadata("crop"),_=o.getMetadata("resize"),u=o.getMetadata("filter")||null,f=o.getMetadata("filters")||null,I=o.getMetadata("colors")||null,c=o.getMetadata("markup")||null,T={crop:r||{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},size:_?{upscale:_.upscale,mode:_.mode,width:_.size.width,height:_.size.height}:null,filter:f?f.id||f.matrix:n.query("GET_ALLOW_IMAGE_FILTER")&&n.query("GET_IMAGE_FILTER_COLOR_MATRIX")&&!I?u:null,color:I,markup:c};a.onconfirm=function(i){var n=i.data,t=n.crop,E=n.size,r=n.filter,_=n.color,u=n.colorMatrix,f=n.markup,I={};if(t&&(I.crop=t),E){var c=(o.getMetadata("resize")||{}).size,T={width:E.width,height:E.height};T.width&&T.height||!c||(T.width=c.width,T.height=c.height),(T.width||T.height)&&(I.resize={upscale:E.upscale,mode:E.mode,size:T})}f&&(I.markup=f),I.colors=_,I.filters=r,I.filter=u,o.setMetadata(I),a.filepondCallbackBridge.onconfirm(n,l(o)),e&&(a.onclose=function(){e(!0),a.onclose=null})},a.oncancel=function(){a.filepondCallbackBridge.oncancel(l(o)),e&&(a.onclose=function(){e(!1),a.onclose=null})},a.open(E,T)}},DID_LOAD_ITEM:function(i){var n=i.root,E=i.props;if(o("GET_IMAGE_EDIT_ALLOW_EDIT")){var l=E.id,a=o("GET_ITEM",l);if(a&&e(a.file))if(n.ref.handleEdit=function(i){i.stopPropagation(),n.dispatch("EDIT_ITEM",{id:l})},r){var u=t.createChildView(_,{label:"edit",icon:o("GET_IMAGE_EDIT_ICON_EDIT"),opacity:0});u.element.classList.add("filepond--action-edit-item"),u.element.dataset.align=o("GET_STYLE_IMAGE_EDIT_BUTTON_EDIT_ITEM_POSITION"),u.on("click",n.ref.handleEdit),n.ref.buttonEditItem=t.appendChildView(u)}else{var f=t.element.querySelector(".filepond--file-info-main"),I=document.createElement("button");I.className="filepond--action-edit-item-alt",I.innerHTML=o("GET_IMAGE_EDIT_ICON_EDIT")+"<span>edit</span>",I.addEventListener("click",n.ref.handleEdit),f.appendChild(I),n.ref.editButton=I}}}};r&&(u.DID_IMAGE_PREVIEW_SHOW=function(i){var n=i.root;n.ref.buttonEditItem&&(n.ref.buttonEditItem.opacity=1)}),t.registerWriter(E(u))}}}})),{options:{allowImageEdit:[!0,o.BOOLEAN],styleImageEditButtonEditItemPosition:["bottom center",o.STRING],imageEditInstantEdit:[!1,o.BOOLEAN],imageEditAllowEdit:[!0,o.BOOLEAN],imageEditIconEdit:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M8.5 17h1.586l7-7L15.5 8.414l-7 7V17zm-1.707-2.707l8-8a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1 0 1.414l-8 8A1 1 0 0 1 10.5 19h-3a1 1 0 0 1-1-1v-3a1 1 0 0 1 .293-.707z" fill="currentColor" fill-rule="nonzero"/></svg>',o.STRING],imageEditEditor:[null,o.OBJECT]}}},"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:o})),o)),l=n({__proto__:null,default:i(r)},[r]);
4
+ import{d as i}from"./p-D8IUoDXw.js";function n(i,n){return n.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(t){if("default"!==t&&!(t in i)){var e=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(i,t,e.get?e:{enumerable:!0,get:function(){return n[t]}})}}))})),Object.freeze(i)}var t,e,o,E={exports:{}},r=t?E.exports:(t=1,E.exports=(e=function(i){return/^image/.test(i.type)},o=function(i){var n=i.addFilter,t=i.utils,o=t.Type,E=t.createRoute,r=t.createItemAPI,l=void 0===r?function(i){return i}:r,_=i.views.fileActionButton;n("SHOULD_REMOVE_ON_REVERT",(function(i,n){var t=n.item,o=n.query;return new Promise((function(i){var n=t.file;i(!(o("GET_ALLOW_IMAGE_EDIT")&&o("GET_IMAGE_EDIT_ALLOW_EDIT")&&e(n)))}))})),n("DID_LOAD_ITEM",(function(i,n){var t=n.query,o=n.dispatch;return new Promise((function(n,E){if(i.origin>1)n(i);else{var r=i.file;if(t("GET_ALLOW_IMAGE_EDIT")&&t("GET_IMAGE_EDIT_INSTANT_EDIT"))if(e(r)){var l=function(i,n,t){return function(e){a.shift(),e?n(i):t(i),o("KICK"),_()}},_=function(){if(a.length){var i=a[0],n=i.item;o("EDIT_ITEM",{id:n.id,handleEditorResponse:l(n,i.resolve,i.reject)})}};u({item:i,resolve:n,reject:E}),1===a.length&&_()}else n(i);else n(i)}}))})),n("DID_CREATE_ITEM",(function(i,n){var t=n.dispatch;i.extend("edit",(function(){t("EDIT_ITEM",{id:i.id})}))}));var a=[],u=function(i){return a.push(i),i};return n("CREATE_VIEW",(function(i){var n=i.is,t=i.view,o=i.query;if(o("GET_ALLOW_IMAGE_EDIT")){var r=o("GET_ALLOW_IMAGE_PREVIEW");if(n("file-info")&&!r||n("file")&&r){var a=o("GET_IMAGE_EDIT_EDITOR");if(a){a.filepondCallbackBridge||(a.outputData=!0,a.outputFile=!1,a.filepondCallbackBridge={onconfirm:a.onconfirm||function(){},oncancel:a.oncancel||function(){}});t.registerDestroyer((function(i){var n=i.root;n.ref.buttonEditItem&&n.ref.buttonEditItem.off("click",n.ref.handleEdit),n.ref.editButton&&n.ref.editButton.removeEventListener("click",n.ref.handleEdit)}));var u={EDIT_ITEM:function(i){var n=i.root,t=i.props.id,e=i.action.handleEditorResponse;a.cropAspectRatio=n.query("GET_IMAGE_CROP_ASPECT_RATIO")||a.cropAspectRatio,a.outputCanvasBackgroundColor=n.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR")||a.outputCanvasBackgroundColor;var o=n.query("GET_ITEM",t);if(o){var E=o.file,r=o.getMetadata("crop"),_=o.getMetadata("resize"),u=o.getMetadata("filter")||null,I=o.getMetadata("filters")||null,f=o.getMetadata("colors")||null,c=o.getMetadata("markup")||null,T={crop:r||{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},size:_?{upscale:_.upscale,mode:_.mode,width:_.size.width,height:_.size.height}:null,filter:I?I.id||I.matrix:n.query("GET_ALLOW_IMAGE_FILTER")&&n.query("GET_IMAGE_FILTER_COLOR_MATRIX")&&!f?u:null,color:f,markup:c};a.onconfirm=function(i){var n=i.data,t=n.crop,E=n.size,r=n.filter,_=n.color,u=n.colorMatrix,I=n.markup,f={};if(t&&(f.crop=t),E){var c=(o.getMetadata("resize")||{}).size,T={width:E.width,height:E.height};T.width&&T.height||!c||(T.width=c.width,T.height=c.height),(T.width||T.height)&&(f.resize={upscale:E.upscale,mode:E.mode,size:T})}I&&(f.markup=I),f.colors=_,f.filters=r,f.filter=u,o.setMetadata(f),a.filepondCallbackBridge.onconfirm(n,l(o)),e&&(a.onclose=function(){e(!0),a.onclose=null})},a.oncancel=function(){a.filepondCallbackBridge.oncancel(l(o)),e&&(a.onclose=function(){e(!1),a.onclose=null})},a.open(E,T)}},DID_LOAD_ITEM:function(i){var n=i.root,E=i.props;if(o("GET_IMAGE_EDIT_ALLOW_EDIT")){var l=E.id,a=o("GET_ITEM",l);if(a&&e(a.file))if(n.ref.handleEdit=function(i){i.stopPropagation(),n.dispatch("EDIT_ITEM",{id:l})},r){var u=t.createChildView(_,{label:"edit",icon:o("GET_IMAGE_EDIT_ICON_EDIT"),opacity:0});u.element.classList.add("filepond--action-edit-item"),u.element.dataset.align=o("GET_STYLE_IMAGE_EDIT_BUTTON_EDIT_ITEM_POSITION"),u.on("click",n.ref.handleEdit),n.ref.buttonEditItem=t.appendChildView(u)}else{var I=t.element.querySelector(".filepond--file-info-main"),f=document.createElement("button");f.className="filepond--action-edit-item-alt",f.innerHTML=o("GET_IMAGE_EDIT_ICON_EDIT")+"<span>edit</span>",f.addEventListener("click",n.ref.handleEdit),I.appendChild(f),n.ref.editButton=f}}}};r&&(u.DID_IMAGE_PREVIEW_SHOW=function(i){var n=i.root;n.ref.buttonEditItem&&(n.ref.buttonEditItem.opacity=1)}),t.registerWriter(E(u))}}}})),{options:{allowImageEdit:[!0,o.BOOLEAN],styleImageEditButtonEditItemPosition:["bottom center",o.STRING],imageEditInstantEdit:[!1,o.BOOLEAN],imageEditAllowEdit:[!0,o.BOOLEAN],imageEditIconEdit:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M8.5 17h1.586l7-7L15.5 8.414l-7 7V17zm-1.707-2.707l8-8a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1 0 1.414l-8 8A1 1 0 0 1 10.5 19h-3a1 1 0 0 1-1-1v-3a1 1 0 0 1 .293-.707z" fill="currentColor" fill-rule="nonzero"/></svg>',o.STRING],imageEditEditor:[null,o.OBJECT]}}},"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:o})),o)),l=n({__proto__:null,default:i(r)},[r]);
5
5
  /*!
6
6
  * FilePondPluginImageEdit 1.6.3
7
7
  * Licensed under MIT, https://opensource.org/licenses/MIT/