@8wave/ai-elements 0.115.0-beta.60 → 0.115.0-beta.72
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.
- package/dist/_chunks/{Agent-Bz23Ejuh.js → Agent-B5gICwnq.js} +2 -5
- package/dist/_chunks/Agent-B5gICwnq.js.map +1 -0
- package/dist/_chunks/{PkChatbotFilePreview-CyaNjBrA.js → PkChatbotFilePreview-Dc9NJ0WF.js} +2 -2
- package/dist/_chunks/{PkChatbotFilePreview-CyaNjBrA.js.map → PkChatbotFilePreview-Dc9NJ0WF.js.map} +1 -1
- package/dist/_chunks/{PkHeldImage-CtqqMvpW.js → PkHeldImage-B4gZSfa6.js} +2 -2
- package/dist/_chunks/{PkHeldImage-CtqqMvpW.js.map → PkHeldImage-B4gZSfa6.js.map} +1 -1
- package/dist/_chunks/{PkLazyImg-Ci06XyhW.js → PkLazyImg-DT3U67q-.js} +3 -2
- package/dist/_chunks/PkLazyImg-DT3U67q-.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown-DbSttKVa.js → PkStreamingMarkdown-LBiDnEgV.js} +3 -3
- package/dist/_chunks/{PkStreamingMarkdown-DbSttKVa.js.map → PkStreamingMarkdown-LBiDnEgV.js.map} +1 -1
- package/dist/_chunks/{PkToolEditSpreadsheet-BrYSJlT4.js → PkToolEditSpreadsheet-YoiuyH9p.js} +3 -3
- package/dist/_chunks/{PkToolEditSpreadsheet-BrYSJlT4.js.map → PkToolEditSpreadsheet-YoiuyH9p.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-D4rIR3LN.js → PkToolRequestGeolocation-m-IXD3Dg.js} +7 -4
- package/dist/_chunks/PkToolRequestGeolocation-m-IXD3Dg.js.map +1 -0
- package/dist/_chunks/{PkToolRequestOAuthConnection-epwcNb5F.js → PkToolRequestOAuthConnection-BLEQZ51Y.js} +3 -3
- package/dist/_chunks/{PkToolRequestOAuthConnection-epwcNb5F.js.map → PkToolRequestOAuthConnection-BLEQZ51Y.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-BGUn1sMi.js → PkToolShowArtifact-KbxEd7Tv.js} +3 -3
- package/dist/_chunks/{PkToolShowArtifact-BGUn1sMi.js.map → PkToolShowArtifact-KbxEd7Tv.js.map} +1 -1
- package/dist/_chunks/{PkToolShowCalendarEvent-DwxqgAUr.js → PkToolShowCalendarEvent-DcaMadO7.js} +3 -3
- package/dist/_chunks/PkToolShowCalendarEvent-DcaMadO7.js.map +1 -0
- package/dist/_chunks/{PkToolShowComparison-hDhhVvwp.js → PkToolShowComparison-DcXSOyMw.js} +2 -2
- package/dist/_chunks/{PkToolShowComparison-hDhhVvwp.js.map → PkToolShowComparison-DcXSOyMw.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-ChaAOt5I.js → PkToolShowContactForm-BjlnuEVy.js} +4 -4
- package/dist/_chunks/{PkToolShowContactForm-ChaAOt5I.js.map → PkToolShowContactForm-BjlnuEVy.js.map} +1 -1
- package/dist/_chunks/{PkToolShowDiagram-CyNPq6j7.js → PkToolShowDiagram-BgyU0CGk.js} +2 -2
- package/dist/_chunks/{PkToolShowDiagram-CyNPq6j7.js.map → PkToolShowDiagram-BgyU0CGk.js.map} +1 -1
- package/dist/_chunks/{PkToolShowEmail-BM16pMjW.js → PkToolShowEmail-AWhVo3l3.js} +2 -2
- package/dist/_chunks/{PkToolShowEmail-BM16pMjW.js.map → PkToolShowEmail-AWhVo3l3.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-BpTuRgHg.js → PkToolShowForm-CaYPCOeb.js} +110 -100
- package/dist/_chunks/PkToolShowForm-CaYPCOeb.js.map +1 -0
- package/dist/_chunks/{PkToolShowImageGallery-CgjP34RE.js → PkToolShowImageGallery-CTuPFowW.js} +4 -4
- package/dist/_chunks/{PkToolShowImageGallery-CgjP34RE.js.map → PkToolShowImageGallery-CTuPFowW.js.map} +1 -1
- package/dist/_chunks/{PkToolShowLocation-rK5fcW4y.js → PkToolShowLocation-Bf4jmDYQ.js} +2 -2
- package/dist/_chunks/{PkToolShowLocation-rK5fcW4y.js.map → PkToolShowLocation-Bf4jmDYQ.js.map} +1 -1
- package/dist/_chunks/{PkToolShowMessage-DgT-JkYg.js → PkToolShowMessage-DlckklB3.js} +2 -2
- package/dist/_chunks/{PkToolShowMessage-DgT-JkYg.js.map → PkToolShowMessage-DlckklB3.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-BIeg8NR-.js → PkToolShowProductList-CThKOr9K.js} +5 -5
- package/dist/_chunks/{PkToolShowProductList-BIeg8NR-.js.map → PkToolShowProductList-CThKOr9K.js.map} +1 -1
- package/dist/_chunks/{PkToolShowQrCode-C2hZDGqM.js → PkToolShowQrCode-CFueYo4P.js} +2 -2
- package/dist/_chunks/{PkToolShowQrCode-C2hZDGqM.js.map → PkToolShowQrCode-CFueYo4P.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-B9nZyCAn.js → PkToolShowSources-DW4LZzdI.js} +49 -28
- package/dist/_chunks/PkToolShowSources-DW4LZzdI.js.map +1 -0
- package/dist/_chunks/{PkToolShowSuggestedReply-D6g3UYqI.js → PkToolShowSuggestedReply-C81p7lmP.js} +3 -3
- package/dist/_chunks/{PkToolShowSuggestedReply-D6g3UYqI.js.map → PkToolShowSuggestedReply-C81p7lmP.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-B6GG8PJm.js → PkToolShowVideo-BBdH255K.js} +4 -4
- package/dist/_chunks/{PkToolShowVideo-B6GG8PJm.js.map → PkToolShowVideo-BBdH255K.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWeather-C80WsCYi.js → PkToolShowWeather-BVllZARr.js} +2 -2
- package/dist/_chunks/{PkToolShowWeather-C80WsCYi.js.map → PkToolShowWeather-BVllZARr.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-BkUh-IyZ.js → PkToolShowWebPages-Bbc8WuLf.js} +5 -5
- package/dist/_chunks/{PkToolShowWebPages-BkUh-IyZ.js.map → PkToolShowWebPages-Bbc8WuLf.js.map} +1 -1
- package/dist/_chunks/{VvCheckbox.es-UTRUhwdC.js → VvCheckbox.es-DKT8ys4U.js} +2 -2
- package/dist/_chunks/{VvCheckbox.es-UTRUhwdC.js.map → VvCheckbox.es-DKT8ys4U.js.map} +1 -1
- package/dist/_chunks/{VvCheckboxGroup.es-Cj7KLXHq.js → VvCheckboxGroup.es-BR2Zrit_.js} +2 -2
- package/dist/_chunks/{VvCheckboxGroup.es-Cj7KLXHq.js.map → VvCheckboxGroup.es-BR2Zrit_.js.map} +1 -1
- package/dist/_chunks/{VvCombobox.es-DptfdnAe.js → VvCombobox.es-DWJtN8ha.js} +2 -2
- package/dist/_chunks/{VvCombobox.es-DptfdnAe.js.map → VvCombobox.es-DWJtN8ha.js.map} +1 -1
- package/dist/_chunks/{VvInputText.es-DqLQDq9I.js → VvInputText.es-BH6ohnZF.js} +2 -2
- package/dist/_chunks/{VvInputText.es-DqLQDq9I.js.map → VvInputText.es-BH6ohnZF.js.map} +1 -1
- package/dist/_chunks/{VvRadio.es-D7Ws1in6.js → VvRadio.es-L9HmgYh4.js} +2 -2
- package/dist/_chunks/{VvRadio.es-D7Ws1in6.js.map → VvRadio.es-L9HmgYh4.js.map} +1 -1
- package/dist/_chunks/{VvRadioGroup.es-BDgpsR9Z.js → VvRadioGroup.es-Dyip2x3c.js} +2 -2
- package/dist/_chunks/{VvRadioGroup.es-BDgpsR9Z.js.map → VvRadioGroup.es-Dyip2x3c.js.map} +1 -1
- package/dist/_chunks/{VvSelect.es-DWbNpZKw.js → VvSelect.es-B8GZOw4X.js} +2 -2
- package/dist/_chunks/{VvSelect.es-DWbNpZKw.js.map → VvSelect.es-B8GZOw4X.js.map} +1 -1
- package/dist/_chunks/{VvTextarea.es-5UD9_C3G.js → VvTextarea.es-7E1SuavW.js} +2 -2
- package/dist/_chunks/{VvTextarea.es-5UD9_C3G.js.map → VvTextarea.es-7E1SuavW.js.map} +1 -1
- package/dist/_chunks/{chatImagePolicy-Cnmsgd96.js → chatImagePolicy-LzNQAjTs.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-Cnmsgd96.js.map → chatImagePolicy-LzNQAjTs.js.map} +1 -1
- package/dist/_chunks/{index.es-D9VqgSyV.js → index.es-DJbHM2zZ.js} +10 -10
- package/dist/_chunks/{index.es-D9VqgSyV.js.map → index.es-DJbHM2zZ.js.map} +1 -1
- package/dist/_chunks/{index.es-B9zAw2XU.js → index.es-D_E1Gj_U.js} +2 -2
- package/dist/_chunks/{index.es-B9zAw2XU.js.map → index.es-D_E1Gj_U.js.map} +1 -1
- package/dist/_chunks/{markdown-25UY48qE.js → markdown-CQLsnBKV.js} +2 -2
- package/dist/_chunks/{markdown-25UY48qE.js.map → markdown-CQLsnBKV.js.map} +1 -1
- package/dist/ai-elements.es.js +293 -221
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotAuth.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotFeedbackForm.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{Agent-Ci7XnQ12.js → Agent-iJ7nRWUV.js} +3 -7
- package/dist-vue/_chunks/Agent-iJ7nRWUV.js.map +1 -0
- package/dist-vue/_chunks/{Document-Bhlc3wdt.js → Document-BFyHxMgI.js} +2 -2
- package/dist-vue/_chunks/{Document-Bhlc3wdt.js.map → Document-BFyHxMgI.js.map} +1 -1
- package/dist-vue/_chunks/{PkAvatar-paEJByEA.js → PkAvatar-ZgCsoO-p.js} +2 -2
- package/dist-vue/_chunks/PkAvatar-ZgCsoO-p.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbot-C05Rv5zO.js → PkChatbot-Ct2nH8y4.js} +9 -9
- package/dist-vue/_chunks/{PkChatbot-C05Rv5zO.js.map → PkChatbot-Ct2nH8y4.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotAuth-DD5RF7kY.js → PkChatbotAuth-CwsXLIku.js} +4 -4
- package/dist-vue/_chunks/PkChatbotAuth-CwsXLIku.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotEmptyState-B5qeL1kv.js → PkChatbotEmptyState-CQCBF59f.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotEmptyState-B5qeL1kv.js.map → PkChatbotEmptyState-CQCBF59f.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BJ_Omuq2.js → PkChatbotFeedbackForm-CYiwvSs_.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BJ_Omuq2.js.map → PkChatbotFeedbackForm-CYiwvSs_.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-BLzTQmvy.js → PkChatbotInput-D7IIfTw1.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-BLzTQmvy.js.map → PkChatbotInput-D7IIfTw1.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-CxTz0W0d.js → PkChatbotMessages-DJPqKh-G.js} +19 -19
- package/dist-vue/_chunks/{PkChatbotMessages-CxTz0W0d.js.map → PkChatbotMessages-DJPqKh-G.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-B04aqOGu.js → PkChatbotStepPayload-dl2-8f27.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-B04aqOGu.js.map → PkChatbotStepPayload-dl2-8f27.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-yII_Dk3p.js → PkChatbotStepToolDetail-f8zOnu2W.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-yII_Dk3p.js.map → PkChatbotStepToolDetail-f8zOnu2W.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-DYiCeWOd.js → PkChatbotSteps-CeuoK2Gk.js} +5 -5
- package/dist-vue/_chunks/{PkChatbotSteps-DYiCeWOd.js.map → PkChatbotSteps-CeuoK2Gk.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-s-Vx4U1E.js → PkChatbotViewChat-X9L9a53H.js} +8 -8
- package/dist-vue/_chunks/{PkChatbotViewChat-s-Vx4U1E.js.map → PkChatbotViewChat-X9L9a53H.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-D7XHDBGS.js → PkChatbotViewConversations-NNzeW5c6.js} +4 -2
- package/dist-vue/_chunks/PkChatbotViewConversations-NNzeW5c6.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewFiles-t07w-VNZ.js → PkChatbotViewFiles-nn23dc0W.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-t07w-VNZ.js.map → PkChatbotViewFiles-nn23dc0W.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-DJT5AEkZ.js → PkChatbotViewProfile-CzY3lj4N.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewProfile-DJT5AEkZ.js.map → PkChatbotViewProfile-CzY3lj4N.js.map} +1 -1
- package/dist-vue/_chunks/{PkLazyImg-CDxX9xnq.js → PkLazyImg-X5BMNU_R.js} +2 -1
- package/dist-vue/_chunks/PkLazyImg-X5BMNU_R.js.map +1 -0
- package/dist-vue/_chunks/{PkStreamingMarkdown-ALhm02o3.js → PkStreamingMarkdown-CCu2pX2c.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-ALhm02o3.js.map → PkStreamingMarkdown-CCu2pX2c.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-DU3RBd6q.js → PkToolEditSpreadsheet-DYcRLINr.js} +2 -2
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-DU3RBd6q.js.map → PkToolEditSpreadsheet-DYcRLINr.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-CE4zQofM.js → PkToolRequestGeolocation-DLU21rbD.js} +6 -3
- package/dist-vue/_chunks/PkToolRequestGeolocation-DLU21rbD.js.map +1 -0
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CAk5s541.js → PkToolRequestOAuthConnection-BS9Wtn1m.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CAk5s541.js.map → PkToolRequestOAuthConnection-BS9Wtn1m.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-CA1sKasD.js → PkToolShowArtifact-B3b6LYSx.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-CA1sKasD.js.map → PkToolShowArtifact-B3b6LYSx.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowCalendarEvent-Cb3lmDQZ.js → PkToolShowCalendarEvent-CL5valn9.js} +2 -2
- package/dist-vue/_chunks/PkToolShowCalendarEvent-CL5valn9.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowContactForm-C0QHEj5k.js → PkToolShowContactForm-C7LaYE_c.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowContactForm-C0QHEj5k.js.map → PkToolShowContactForm-C7LaYE_c.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-CQUd_reA.js → PkToolShowDiagram-CR-TthJm.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-CQUd_reA.js.map → PkToolShowDiagram-CR-TthJm.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-B_ezmfuo.js → PkToolShowForm-BDaYT4E0.js} +100 -90
- package/dist-vue/_chunks/PkToolShowForm-BDaYT4E0.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowImageGallery-B8gmmHvk.js → PkToolShowImageGallery-ER7LyVJD.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-B8gmmHvk.js.map → PkToolShowImageGallery-ER7LyVJD.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-BMvt5mKe.js → PkToolShowProductList-B3iZIwOJ.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowProductList-BMvt5mKe.js.map → PkToolShowProductList-B3iZIwOJ.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowSources-ITHEa-D-.js +263 -0
- package/dist-vue/_chunks/PkToolShowSources-ITHEa-D-.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-BE6gBA-2.js → PkToolShowSuggestedReply-CZm_THD0.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-BE6gBA-2.js.map → PkToolShowSuggestedReply-CZm_THD0.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-ZPDVzjPX.js → PkToolShowVideo-Pe0DhYm5.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-ZPDVzjPX.js.map → PkToolShowVideo-Pe0DhYm5.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-dI4WMr7F.js → PkToolShowWebPages-ZfGH4XNP.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowWebPages-dI4WMr7F.js.map → PkToolShowWebPages-ZfGH4XNP.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-IlTQndxL.js → createChatbotApiClient-BVC9GxV_.js} +2 -2
- package/dist-vue/_chunks/createChatbotApiClient-BVC9GxV_.js.map +1 -0
- package/dist-vue/_chunks/{index.es-VzNLOQUv.js → index.es-Io4Mdm4X.js} +2 -2
- package/dist-vue/_chunks/{index.es-VzNLOQUv.js.map → index.es-Io4Mdm4X.js.map} +1 -1
- package/dist-vue/_chunks/{useChatbotStore-CtJ3bwuy.js → useChatbotStore-Drg3gBff.js} +3 -3
- package/dist-vue/_chunks/{useChatbotStore-CtJ3bwuy.js.map → useChatbotStore-Drg3gBff.js.map} +1 -1
- package/dist-vue/_chunks/{utils-BzypADaU.js → utils-wUVFCJMG.js} +2 -2
- package/dist-vue/_chunks/{utils-BzypADaU.js.map → utils-wUVFCJMG.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +261 -191
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +249 -201
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +171 -169
- package/dist-vue/packages/ability/src/types.d.ts +0 -1
- package/dist-vue/packages/components/src/chat/PkDocumentHeader.d.ts +5 -0
- package/dist-vue/packages/components/src/chat/PkMessageDetail.d.ts +2 -2
- package/dist-vue/packages/components/src/table/PkTableSortable.d.ts +4 -0
- package/dist-vue/packages/composable/src/useBranding.d.ts +0 -1
- package/dist-vue/packages/models/src/schema/Branding.d.ts +21 -9
- package/dist-vue/packages/models/src/schema/TimingLog.d.ts +4 -6
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-Bz23Ejuh.js.map +0 -1
- package/dist/_chunks/PkLazyImg-Ci06XyhW.js.map +0 -1
- package/dist/_chunks/PkToolRequestGeolocation-D4rIR3LN.js.map +0 -1
- package/dist/_chunks/PkToolShowCalendarEvent-DwxqgAUr.js.map +0 -1
- package/dist/_chunks/PkToolShowForm-BpTuRgHg.js.map +0 -1
- package/dist/_chunks/PkToolShowSources-B9nZyCAn.js.map +0 -1
- package/dist-vue/_chunks/Agent-Ci7XnQ12.js.map +0 -1
- package/dist-vue/_chunks/PkAvatar-paEJByEA.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotAuth-DD5RF7kY.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewConversations-D7XHDBGS.js.map +0 -1
- package/dist-vue/_chunks/PkLazyImg-CDxX9xnq.js.map +0 -1
- package/dist-vue/_chunks/PkToolRequestGeolocation-CE4zQofM.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowCalendarEvent-Cb3lmDQZ.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowForm-B_ezmfuo.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowSources-DEmjN0Ou.js +0 -242
- package/dist-vue/_chunks/PkToolShowSources-DEmjN0Ou.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-IlTQndxL.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PkToolShowContactForm-C0QHEj5k.js","names":["z.object","z.string","z.email","useForm","__unplugin_components_0","__unplugin_components_1","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_toDisplayString","_unref","_Transition","_withCtx","_isRef","PkStreamingMarkdown","_sfc_main","__exportAll","object","string","email","PkStreamingMarkdown_default","useSafeLocalStorage","useLocalizedString","Se","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","PkToolShowContactForm_vue_vue_type_script_setup_true_lang_default","__emit","$t","useI18n","props","__props","toolPart","computed","input","localSubmitted","LeadFormSchema","emit","watch","newInput","submitted","isSubmitted","submitLead","data","privacyNotice","_component_VvIcon","VvIcon","_component_VvButton","VvButton","openBlock","createElementBlock","createElementVNode","createVNode","toDisplayString","unref","Transition","withCtx","VvForm","formData","_cache","isRef","$event","VvFormField","PkToolShowContactForm_exports","PkToolShowContactForm_default"],"sources":["../../../../packages/components/src/chat/PkToolShowContactForm.vue","../../../../packages/components/src/chat/PkToolShowContactForm.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, watch } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { useForm } from '@volverjs/form-vue'\n import * as z from 'zod'\n import { useSafeLocalStorage, useLocalizedString } from 'composables'\n import type { LocalizedString } from 'models'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n\n const { t: $t } = useI18n({ useScope: 'global' })\n\n const props = defineProps<{\n part: unknown\n submitted?: boolean\n loading?: boolean\n error?: string\n readonly?: boolean\n privacyPolicyNotice?: LocalizedString\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n type: string\n toolCallId: string\n input?: {\n name: string\n email: string\n phone?: string\n conversationContext?: Record<string, unknown>\n }\n }\n return part\n })\n\n const input = computed(() => toolPart.value.input)\n\n const localSubmitted = useSafeLocalStorage<boolean>(\n computed(\n () =>\n `${toolPart.value.toolCallId}-${toolPart.value.type}-submitted`,\n ),\n false,\n )\n\n const LeadFormSchema = z.object({\n name: z.string().min(1).max(255).default(''),\n email: z.email().max(255).default(''),\n phone: z\n .string()\n .max(50)\n .regex(/^[+0-9\\s\\-.()]*$/, $t('validation.invalidPhoneNumber'))\n .optional(),\n })\n\n const emit = defineEmits<{\n submit: [data: Record<string, unknown>]\n }>()\n\n const { VvForm, VvFormField, formData } = useForm(LeadFormSchema, {\n lazyLoad: true,\n })\n\n // Pre-populate form with input values\n watch(\n input,\n (newInput) => {\n formData.value = {\n name: newInput?.name || '',\n email: newInput?.email || '',\n phone: newInput?.phone || '',\n }\n },\n { immediate: true },\n )\n\n watch(\n () => props.submitted,\n (submitted) => {\n if (submitted) {\n localSubmitted.value = true\n }\n },\n { immediate: true },\n )\n\n const isSubmitted = computed(() => {\n return props.submitted || localSubmitted.value\n })\n\n const submitLead = async (data: Record<string, unknown>): Promise<void> => {\n emit('submit', { ...data, metadata: input.value?.conversationContext })\n }\n\n const privacyNotice = useLocalizedString(\n () => props.privacyPolicyNotice,\n 'message.defaultPrivacyPolicyNotice',\n )\n</script>\n\n<template>\n <div\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40\">\n <VvIcon name=\"ri:send-plane-2-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{ $t('label.contactUs') }}</strong>\n </div>\n\n <Transition mode=\"out-in\">\n <div v-if=\"!isSubmitted\" class=\"p-sm\">\n <VvForm v-model=\"formData\" :readonly @submit=\"submitLead\">\n <VvFormField\n name=\"name\"\n type=\"text\"\n :label=\"$t('label.name')\"\n :placeholder=\"$t('placeholder.name')\"\n icon=\"ri:user-line\"\n modifiers=\"compact no-label\"\n class=\"mb-md\" />\n <VvFormField\n name=\"email\"\n type=\"email\"\n :label=\"$t('label.email')\"\n :placeholder=\"$t('placeholder.email')\"\n icon=\"ri:mail-line\"\n modifiers=\"compact no-label\"\n class=\"mb-md\" />\n <VvFormField\n name=\"phone\"\n type=\"tel\"\n :label=\"$t('label.phone')\"\n :placeholder=\"$t('placeholder.phone')\"\n icon=\"ri:phone-line\"\n class=\"mb-md\"\n modifiers=\"compact no-label\" />\n\n <div class=\"flex justify-between items-center gap-16 mt-xs\">\n <div\n class=\"text-smaller text-word-3 flex items-center gap-8\">\n <VvIcon\n name=\"ri:shield-check-line\"\n class=\"text-16 shrink-0\" />\n <PkStreamingMarkdown\n :markdown=\"privacyNotice\"\n class=\"wysiwyg\" />\n </div>\n <VvButton\n type=\"submit\"\n modifiers=\"primary\"\n :loading\n :disabled=\"loading || readonly\"\n icon-position=\"right\"\n class=\"shrink-0\"\n :label=\"$t('action.submit')\" />\n </div>\n </VvForm>\n </div>\n <div v-else class=\"p-sm\">\n <!-- One confirmation row across every tool card: a green\n check, the title in weight, the body quiet. The check is\n the outcome, so it alone carries the colour (DESIGN.md). -->\n <div class=\"flex items-center gap-sm\">\n <VvIcon name=\"ri:check-line\" class=\"text-16 text-success\" />\n <div>\n <strong class=\"font-medium block text-word-1\">\n {{ $t('message.leadSubmittedTitle') }}\n </strong>\n <p class=\"text-word-3\">\n {{ $t('message.leadSubmittedMessage') }}\n </p>\n </div>\n </div>\n </div>\n </Transition>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed, watch } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { useForm } from '@volverjs/form-vue'\n import * as z from 'zod'\n import { useSafeLocalStorage, useLocalizedString } from 'composables'\n import type { LocalizedString } from 'models'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n\n const { t: $t } = useI18n({ useScope: 'global' })\n\n const props = defineProps<{\n part: unknown\n submitted?: boolean\n loading?: boolean\n error?: string\n readonly?: boolean\n privacyPolicyNotice?: LocalizedString\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n type: string\n toolCallId: string\n input?: {\n name: string\n email: string\n phone?: string\n conversationContext?: Record<string, unknown>\n }\n }\n return part\n })\n\n const input = computed(() => toolPart.value.input)\n\n const localSubmitted = useSafeLocalStorage<boolean>(\n computed(\n () =>\n `${toolPart.value.toolCallId}-${toolPart.value.type}-submitted`,\n ),\n false,\n )\n\n const LeadFormSchema = z.object({\n name: z.string().min(1).max(255).default(''),\n email: z.email().max(255).default(''),\n phone: z\n .string()\n .max(50)\n .regex(/^[+0-9\\s\\-.()]*$/, $t('validation.invalidPhoneNumber'))\n .optional(),\n })\n\n const emit = defineEmits<{\n submit: [data: Record<string, unknown>]\n }>()\n\n const { VvForm, VvFormField, formData } = useForm(LeadFormSchema, {\n lazyLoad: true,\n })\n\n // Pre-populate form with input values\n watch(\n input,\n (newInput) => {\n formData.value = {\n name: newInput?.name || '',\n email: newInput?.email || '',\n phone: newInput?.phone || '',\n }\n },\n { immediate: true },\n )\n\n watch(\n () => props.submitted,\n (submitted) => {\n if (submitted) {\n localSubmitted.value = true\n }\n },\n { immediate: true },\n )\n\n const isSubmitted = computed(() => {\n return props.submitted || localSubmitted.value\n })\n\n const submitLead = async (data: Record<string, unknown>): Promise<void> => {\n emit('submit', { ...data, metadata: input.value?.conversationContext })\n }\n\n const privacyNotice = useLocalizedString(\n () => props.privacyPolicyNotice,\n 'message.defaultPrivacyPolicyNotice',\n )\n</script>\n\n<template>\n <div\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40\">\n <VvIcon name=\"ri:send-plane-2-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{ $t('label.contactUs') }}</strong>\n </div>\n\n <Transition mode=\"out-in\">\n <div v-if=\"!isSubmitted\" class=\"p-sm\">\n <VvForm v-model=\"formData\" :readonly @submit=\"submitLead\">\n <VvFormField\n name=\"name\"\n type=\"text\"\n :label=\"$t('label.name')\"\n :placeholder=\"$t('placeholder.name')\"\n icon=\"ri:user-line\"\n modifiers=\"compact no-label\"\n class=\"mb-md\" />\n <VvFormField\n name=\"email\"\n type=\"email\"\n :label=\"$t('label.email')\"\n :placeholder=\"$t('placeholder.email')\"\n icon=\"ri:mail-line\"\n modifiers=\"compact no-label\"\n class=\"mb-md\" />\n <VvFormField\n name=\"phone\"\n type=\"tel\"\n :label=\"$t('label.phone')\"\n :placeholder=\"$t('placeholder.phone')\"\n icon=\"ri:phone-line\"\n class=\"mb-md\"\n modifiers=\"compact no-label\" />\n\n <div class=\"flex justify-between items-center gap-16 mt-xs\">\n <div\n class=\"text-smaller text-word-3 flex items-center gap-8\">\n <VvIcon\n name=\"ri:shield-check-line\"\n class=\"text-16 shrink-0\" />\n <PkStreamingMarkdown\n :markdown=\"privacyNotice\"\n class=\"wysiwyg\" />\n </div>\n <VvButton\n type=\"submit\"\n modifiers=\"primary\"\n :loading\n :disabled=\"loading || readonly\"\n icon-position=\"right\"\n class=\"shrink-0\"\n :label=\"$t('action.submit')\" />\n </div>\n </VvForm>\n </div>\n <div v-else class=\"p-sm\">\n <!-- One confirmation row across every tool card: a green\n check, the title in weight, the body quiet. The check is\n the outcome, so it alone carries the colour (DESIGN.md). -->\n <div class=\"flex items-center gap-sm\">\n <VvIcon name=\"ri:check-line\" class=\"text-16 text-success\" />\n <div>\n <strong class=\"font-medium block text-word-1\">\n {{ $t('message.leadSubmittedTitle') }}\n </strong>\n <p class=\"text-word-3\">\n {{ $t('message.leadSubmittedMessage') }}\n </p>\n </div>\n </div>\n </div>\n </Transition>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;EASI,I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V5B,EAOmCE,EAAA4D,CAAA,GAAA;OAN/B,MAAK;OACL,MAAK;OACJ,OAAO5D,EAAA0B,CAAA,CAAE,CAAA,aAAA;OACT,aAAa1B,EAAA0B,CAAA,CAAE,CAAA,mBAAA;OAChB,MAAK;OACL,OAAM;OACN,WAAU;;MAEd7B,EAkBM,OAlBNqB,GAkBM,CAjBFrB,EAQM,OARNsB,GAQM,CANFrB,EAE+B6C,GAAA;OAD3B,MAAK;OACL,OAAM;MACV7C,CAAAA,GAAAA,EAEsBM,GAAA;OADjB,UAAUJ,EAAA0C,CAAA;OACX,OAAM;MAEd5C,GAAAA,MAAAA,GAAAA,CAAAA,UAAAA,CAAAA,CAAAA,CAAAA,GAAAA,EAOmC+C,GAAA;OAN/B,MAAK;OACL,WAAU;OACT,SAAAhB,EAAA;OACA,UAAUA,EAAA,WAAWA,EAAA;OACtB,iBAAc;OACd,OAAM;OACL,OAAO7B,EAAA0B,CAAA,CAAE,CAAA,eAAA;;;;;;;;IAI1B/B,GAAAA,GAAAA,CAAAA,cAAAA,UAAAA,CAAAA,CAAAA,CAAAA,EAWqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"PkToolShowContactForm-C7LaYE_c.js","names":["z.object","z.string","z.email","useForm","__unplugin_components_0","__unplugin_components_1","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_toDisplayString","_unref","_Transition","_withCtx","_isRef","PkStreamingMarkdown","_sfc_main","__exportAll","object","string","email","PkStreamingMarkdown_default","useSafeLocalStorage","useLocalizedString","Se","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","PkToolShowContactForm_vue_vue_type_script_setup_true_lang_default","__emit","$t","useI18n","props","__props","toolPart","computed","input","localSubmitted","LeadFormSchema","emit","watch","newInput","submitted","isSubmitted","submitLead","data","privacyNotice","_component_VvIcon","VvIcon","_component_VvButton","VvButton","openBlock","createElementBlock","createElementVNode","createVNode","toDisplayString","unref","Transition","withCtx","VvForm","formData","_cache","isRef","$event","VvFormField","PkToolShowContactForm_exports","PkToolShowContactForm_default"],"sources":["../../../../packages/components/src/chat/PkToolShowContactForm.vue","../../../../packages/components/src/chat/PkToolShowContactForm.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, watch } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { useForm } from '@volverjs/form-vue'\n import * as z from 'zod'\n import { useSafeLocalStorage, useLocalizedString } from 'composables'\n import type { LocalizedString } from 'models'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n\n const { t: $t } = useI18n({ useScope: 'global' })\n\n const props = defineProps<{\n part: unknown\n submitted?: boolean\n loading?: boolean\n error?: string\n readonly?: boolean\n privacyPolicyNotice?: LocalizedString\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n type: string\n toolCallId: string\n input?: {\n name: string\n email: string\n phone?: string\n conversationContext?: Record<string, unknown>\n }\n }\n return part\n })\n\n const input = computed(() => toolPart.value.input)\n\n const localSubmitted = useSafeLocalStorage<boolean>(\n computed(\n () =>\n `${toolPart.value.toolCallId}-${toolPart.value.type}-submitted`,\n ),\n false,\n )\n\n const LeadFormSchema = z.object({\n name: z.string().min(1).max(255).default(''),\n email: z.email().max(255).default(''),\n phone: z\n .string()\n .max(50)\n .regex(/^[+0-9\\s\\-.()]*$/, $t('validation.invalidPhoneNumber'))\n .optional(),\n })\n\n const emit = defineEmits<{\n submit: [data: Record<string, unknown>]\n }>()\n\n const { VvForm, VvFormField, formData } = useForm(LeadFormSchema, {\n lazyLoad: true,\n })\n\n // Pre-populate form with input values\n watch(\n input,\n (newInput) => {\n formData.value = {\n name: newInput?.name || '',\n email: newInput?.email || '',\n phone: newInput?.phone || '',\n }\n },\n { immediate: true },\n )\n\n watch(\n () => props.submitted,\n (submitted) => {\n if (submitted) {\n localSubmitted.value = true\n }\n },\n { immediate: true },\n )\n\n const isSubmitted = computed(() => {\n return props.submitted || localSubmitted.value\n })\n\n const submitLead = async (data: Record<string, unknown>): Promise<void> => {\n emit('submit', { ...data, metadata: input.value?.conversationContext })\n }\n\n const privacyNotice = useLocalizedString(\n () => props.privacyPolicyNotice,\n 'message.defaultPrivacyPolicyNotice',\n )\n</script>\n\n<template>\n <div\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40\">\n <VvIcon name=\"ri:send-plane-2-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{ $t('label.contactUs') }}</strong>\n </div>\n\n <Transition mode=\"out-in\">\n <div v-if=\"!isSubmitted\" class=\"p-sm\">\n <VvForm v-model=\"formData\" :readonly @submit=\"submitLead\">\n <VvFormField\n name=\"name\"\n type=\"text\"\n :label=\"$t('label.name')\"\n :placeholder=\"$t('placeholder.name')\"\n icon=\"ri:user-line\"\n modifiers=\"compact no-label\"\n class=\"mb-md\" />\n <VvFormField\n name=\"email\"\n type=\"email\"\n :label=\"$t('label.email')\"\n :placeholder=\"$t('placeholder.email')\"\n icon=\"ri:mail-line\"\n modifiers=\"compact no-label\"\n class=\"mb-md\" />\n <VvFormField\n name=\"phone\"\n type=\"tel\"\n :label=\"$t('label.phone')\"\n :placeholder=\"$t('placeholder.phone')\"\n icon=\"ri:phone-line\"\n class=\"mb-md\"\n modifiers=\"compact no-label\" />\n\n <div class=\"flex justify-between items-center gap-16 mt-xs\">\n <div\n class=\"text-smaller text-word-3 flex items-center gap-8\">\n <VvIcon\n name=\"ri:shield-check-line\"\n class=\"text-16 shrink-0\" />\n <PkStreamingMarkdown\n :markdown=\"privacyNotice\"\n class=\"wysiwyg\" />\n </div>\n <VvButton\n type=\"submit\"\n modifiers=\"primary\"\n :loading\n :disabled=\"loading || readonly\"\n icon-position=\"right\"\n class=\"shrink-0\"\n :label=\"$t('action.submit')\" />\n </div>\n </VvForm>\n </div>\n <div v-else class=\"p-sm\">\n <!-- One confirmation row across every tool card: a green\n check, the title in weight, the body quiet. The check is\n the outcome, so it alone carries the colour (DESIGN.md). -->\n <div class=\"flex items-center gap-sm\">\n <VvIcon name=\"ri:check-line\" class=\"text-16 text-success\" />\n <div>\n <strong class=\"font-medium block text-word-1\">\n {{ $t('message.leadSubmittedTitle') }}\n </strong>\n <p class=\"text-word-3\">\n {{ $t('message.leadSubmittedMessage') }}\n </p>\n </div>\n </div>\n </div>\n </Transition>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed, watch } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { useForm } from '@volverjs/form-vue'\n import * as z from 'zod'\n import { useSafeLocalStorage, useLocalizedString } from 'composables'\n import type { LocalizedString } from 'models'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n\n const { t: $t } = useI18n({ useScope: 'global' })\n\n const props = defineProps<{\n part: unknown\n submitted?: boolean\n loading?: boolean\n error?: string\n readonly?: boolean\n privacyPolicyNotice?: LocalizedString\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n type: string\n toolCallId: string\n input?: {\n name: string\n email: string\n phone?: string\n conversationContext?: Record<string, unknown>\n }\n }\n return part\n })\n\n const input = computed(() => toolPart.value.input)\n\n const localSubmitted = useSafeLocalStorage<boolean>(\n computed(\n () =>\n `${toolPart.value.toolCallId}-${toolPart.value.type}-submitted`,\n ),\n false,\n )\n\n const LeadFormSchema = z.object({\n name: z.string().min(1).max(255).default(''),\n email: z.email().max(255).default(''),\n phone: z\n .string()\n .max(50)\n .regex(/^[+0-9\\s\\-.()]*$/, $t('validation.invalidPhoneNumber'))\n .optional(),\n })\n\n const emit = defineEmits<{\n submit: [data: Record<string, unknown>]\n }>()\n\n const { VvForm, VvFormField, formData } = useForm(LeadFormSchema, {\n lazyLoad: true,\n })\n\n // Pre-populate form with input values\n watch(\n input,\n (newInput) => {\n formData.value = {\n name: newInput?.name || '',\n email: newInput?.email || '',\n phone: newInput?.phone || '',\n }\n },\n { immediate: true },\n )\n\n watch(\n () => props.submitted,\n (submitted) => {\n if (submitted) {\n localSubmitted.value = true\n }\n },\n { immediate: true },\n )\n\n const isSubmitted = computed(() => {\n return props.submitted || localSubmitted.value\n })\n\n const submitLead = async (data: Record<string, unknown>): Promise<void> => {\n emit('submit', { ...data, metadata: input.value?.conversationContext })\n }\n\n const privacyNotice = useLocalizedString(\n () => props.privacyPolicyNotice,\n 'message.defaultPrivacyPolicyNotice',\n )\n</script>\n\n<template>\n <div\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40\">\n <VvIcon name=\"ri:send-plane-2-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{ $t('label.contactUs') }}</strong>\n </div>\n\n <Transition mode=\"out-in\">\n <div v-if=\"!isSubmitted\" class=\"p-sm\">\n <VvForm v-model=\"formData\" :readonly @submit=\"submitLead\">\n <VvFormField\n name=\"name\"\n type=\"text\"\n :label=\"$t('label.name')\"\n :placeholder=\"$t('placeholder.name')\"\n icon=\"ri:user-line\"\n modifiers=\"compact no-label\"\n class=\"mb-md\" />\n <VvFormField\n name=\"email\"\n type=\"email\"\n :label=\"$t('label.email')\"\n :placeholder=\"$t('placeholder.email')\"\n icon=\"ri:mail-line\"\n modifiers=\"compact no-label\"\n class=\"mb-md\" />\n <VvFormField\n name=\"phone\"\n type=\"tel\"\n :label=\"$t('label.phone')\"\n :placeholder=\"$t('placeholder.phone')\"\n icon=\"ri:phone-line\"\n class=\"mb-md\"\n modifiers=\"compact no-label\" />\n\n <div class=\"flex justify-between items-center gap-16 mt-xs\">\n <div\n class=\"text-smaller text-word-3 flex items-center gap-8\">\n <VvIcon\n name=\"ri:shield-check-line\"\n class=\"text-16 shrink-0\" />\n <PkStreamingMarkdown\n :markdown=\"privacyNotice\"\n class=\"wysiwyg\" />\n </div>\n <VvButton\n type=\"submit\"\n modifiers=\"primary\"\n :loading\n :disabled=\"loading || readonly\"\n icon-position=\"right\"\n class=\"shrink-0\"\n :label=\"$t('action.submit')\" />\n </div>\n </VvForm>\n </div>\n <div v-else class=\"p-sm\">\n <!-- One confirmation row across every tool card: a green\n check, the title in weight, the body quiet. The check is\n the outcome, so it alone carries the colour (DESIGN.md). -->\n <div class=\"flex items-center gap-sm\">\n <VvIcon name=\"ri:check-line\" class=\"text-16 text-success\" />\n <div>\n <strong class=\"font-medium block text-word-1\">\n {{ $t('message.leadSubmittedTitle') }}\n </strong>\n <p class=\"text-word-3\">\n {{ $t('message.leadSubmittedMessage') }}\n </p>\n </div>\n </div>\n </div>\n </Transition>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;EASI,IAAM,EAAE,GAAGqC,MAAOC,EAAQ,EAAE,UAAU,SAAS,CAAC,GAE1CC,IAAQC,GASRC,IAAWC,QACAH,EAAM,IAWtB,GAEKI,IAAQD,QAAeD,EAAS,MAAM,KAAK,GAE3CG,IAAiBtB,EACnBoB,QAEQ,GAAGD,EAAS,MAAM,WAAW,GAAGA,EAAS,MAAM,KAAK,WAC5D,GACA,EACJ,GAEMI,IAAiB7C,EAAS;GAC5B,MAAMC,EAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE;GAC3C,OAAOC,EAAQ,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE;GACpC,OAAOD,EACK,CAAA,CACP,IAAI,EAAE,CAAA,CACN,MAAM,oBAAoBoC,EAAG,+BAA+B,CAAC,CAAA,CAC7D,SAAS;EAClB,CAAC,GAEKS,IAAOV,GAIP,EAAE,WAAQ,gBAAa,gBAAajC,EAAQ0C,GAAgB,EAC9D,UAAU,GACd,CAAC;EAeD,AAZAE,EACIJ,IACC,MAAa;GACV,EAAS,QAAQ;IACb,MAAMK,GAAU,QAAQ;IACxB,OAAOA,GAAU,SAAS;IAC1B,OAAOA,GAAU,SA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a as e } from "./PkChatbotMessages-
|
|
2
|
+
import { a as e } from "./PkChatbotMessages-DJPqKh-G.js";
|
|
3
3
|
import { t } from "./PkSvgViewer-D1y8hZRW.js";
|
|
4
4
|
import { VvButton as n, VvButtonGroup as r, VvIcon as i } from "@volverjs/ui-vue/components";
|
|
5
5
|
import { computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createVNode as u, defineComponent as d, onMounted as f, openBlock as p, ref as m, toDisplayString as h, unref as g, watch as _, withCtx as v } from "vue";
|
|
@@ -119,4 +119,4 @@ var x = {
|
|
|
119
119
|
//#endregion
|
|
120
120
|
export { k as default };
|
|
121
121
|
|
|
122
|
-
//# sourceMappingURL=PkToolShowDiagram-
|
|
122
|
+
//# sourceMappingURL=PkToolShowDiagram-CR-TthJm.js.map
|
package/dist-vue/_chunks/{PkToolShowDiagram-CQUd_reA.js.map → PkToolShowDiagram-CR-TthJm.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PkToolShowDiagram-CQUd_reA.js","names":["__unplugin_components_0","__unplugin_components_1","__unplugin_components_2","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_toDisplayString","_unref","_withCtx","_createBlock","_createCommentVNode","PkSvgViewer","_sfc_main","toSnakeCase","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","DiagramType","\"Sequence\"","\"Class\"","\"State\"","\"ER\"","\"XYChart\"","\"Flowchart\"","\"Graph\"","PkToolShowDiagram_default","defineComponent","props","__props","$t","$te","useI18n","useClipboard","toolPart","computed","svgError","ref","svgContent","diagramType","code","diagramTypeLabel","diagramTypeIcon","renderDiagram","theme","THEMES","renderMermaidSVG","watch","onMounted","downloadSvg","blob","url","anchor","copyCode","copy","_component_VvIcon","VvIcon","_component_VvButton","VvButton","_component_VvButtonGroup","VvButtonGroup","openBlock","createElementBlock","createElementVNode","createVNode","toDisplayString","unref","withCtx","copied","createBlock","createCommentVNode","PkSvgViewer_default"],"sources":["../../../../packages/components/src/chat/PkToolShowDiagram.vue","../../../../packages/components/src/chat/PkToolShowDiagram.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, onMounted, ref, watch } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useI18n } from 'vue-i18n'\n import { toSnakeCase } from 'utils'\n import PkSvgViewer from '../PkSvgViewer.vue'\n\n const props = defineProps<{\n part: unknown\n isDark?: boolean\n }>()\n\n const { t: $t, te: $te } = useI18n({\n useScope: 'global',\n })\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n code: string\n title?: string\n caption?: string\n }\n }\n return part\n })\n\n const svgError = ref(false)\n\n // Serialized SVG content\n const svgContent = ref('')\n\n enum DiagramType {\n Sequence = 'sequenceDiagram',\n Class = 'classDiagram',\n State = 'stateDiagram',\n ER = 'erDiagram',\n XYChart = 'xychart',\n Flowchart = 'flowchart',\n Graph = 'graph',\n }\n\n const diagramType = computed<DiagramType | undefined>(() => {\n const code = toolPart.value.input?.code?.trimStart()\n if (!code) {\n return undefined\n }\n const firstWord = code.match(/^[A-Za-z-]+/)?.[0]\n switch (firstWord) {\n case 'sequenceDiagram':\n return DiagramType.Sequence\n case 'classDiagram':\n return DiagramType.Class\n case 'stateDiagram':\n return DiagramType.State\n case 'erDiagram':\n return DiagramType.ER\n case 'xychart-beta':\n return DiagramType.XYChart\n case 'flowchart':\n return DiagramType.Flowchart\n case 'graph':\n return DiagramType.Graph\n default:\n return undefined\n }\n })\n\n const diagramTypeLabel = computed(() => {\n if (!diagramType.value) {\n return ''\n }\n return $te(`diagram.${diagramType.value}`)\n ? $t(`diagram.${diagramType.value}`)\n : diagramType.value\n })\n\n const diagramTypeIcon = computed(() => {\n switch (diagramType.value) {\n case DiagramType.Sequence:\n return 'ri:timeline-view'\n case DiagramType.Class:\n return 'ri:organization-chart'\n case DiagramType.State:\n return 'ri:organization-chart'\n case DiagramType.ER:\n return 'ri:organization-chart'\n case DiagramType.XYChart:\n return 'ri:line-chart-line'\n case DiagramType.Flowchart:\n return 'ri:flow-chart'\n case DiagramType.Graph:\n return 'ri:flow-chart'\n default:\n return 'ri:flow-chart'\n }\n })\n\n async function renderDiagram() {\n const code = toolPart.value.input?.code\n if (!code) {\n return\n }\n\n svgError.value = false\n try {\n const { renderMermaidSVG, THEMES } =\n await import('beautiful-mermaid')\n const theme = props.isDark\n ? THEMES['github-dark']\n : THEMES['github-light']\n svgContent.value = renderMermaidSVG(code, theme)\n } catch {\n svgError.value = true\n }\n }\n\n watch([() => toolPart.value.input?.code, () => props.isDark], renderDiagram)\n onMounted(async () => {\n await renderDiagram()\n })\n\n const downloadSvg = () => {\n if (!svgContent.value) {\n return\n }\n const blob = new Blob([svgContent.value], {\n type: 'image/svg+xml;charset=utf-8',\n })\n const url = URL.createObjectURL(blob)\n const anchor = document.createElement('a')\n anchor.href = url\n anchor.download = `${toSnakeCase(toolPart.value.input?.title || 'diagram')}.svg`\n document.body.appendChild(anchor)\n anchor.click()\n document.body.removeChild(anchor)\n URL.revokeObjectURL(url)\n }\n\n const copyCode = () => {\n const code = toolPart.value.input?.code\n if (code) {\n copy(code)\n }\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.code\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon :name=\"diagramTypeIcon\" class=\"text-16\" />\n <div class=\"flex flex-col items-start gap-2\">\n <strong class=\"font-bold\">{{\n diagramTypeLabel ?? $t('label.diagram')\n }}</strong>\n </div>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyCode\" />\n <VvButton\n v-if=\"svgContent\"\n modifiers=\"action-quiet-small\"\n icon=\"ri:download-line\"\n :label=\"$t('action.download')\"\n @click=\"downloadSvg\" />\n </VvButtonGroup>\n </div>\n <div v-if=\"svgError\" class=\"text-12 text-danger py-8 px-sm\">\n {{ $t('message.diagramRenderError') }}\n </div>\n <PkSvgViewer\n v-else-if=\"svgContent\"\n class=\"pk-tool-show-diagram__stage\"\n :svg=\"svgContent\"\n :title=\"toolPart.input?.title\" />\n <div\n v-else\n class=\"pk-tool-show-diagram__stage flex justify-center items-center\">\n <VvIcon name=\"loading-loop\" class=\"w-24 h-24 text-word-5\" />\n </div>\n <div\n v-if=\"toolPart.input.caption\"\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-t border-surface-3 text-word-3\">\n {{ toolPart.input.caption }}\n </div>\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-tool-show-diagram {\n // Fixed stage height: the diagram renders lazily (async chunk +\n // dynamic mermaid import), so the loader and the rendered SVG must\n // occupy the same space or the chat scroll position jumps around.\n // The SVG scales to fit; zoom/pan and the lightbox cover the rest.\n &__stage {\n height: 384px;\n\n .pk-svg-viewer__stage,\n .pk-svg-viewer__content {\n height: 100%;\n }\n }\n }\n</style>\n","<script setup lang=\"ts\">\n import { computed, onMounted, ref, watch } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useI18n } from 'vue-i18n'\n import { toSnakeCase } from 'utils'\n import PkSvgViewer from '../PkSvgViewer.vue'\n\n const props = defineProps<{\n part: unknown\n isDark?: boolean\n }>()\n\n const { t: $t, te: $te } = useI18n({\n useScope: 'global',\n })\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n code: string\n title?: string\n caption?: string\n }\n }\n return part\n })\n\n const svgError = ref(false)\n\n // Serialized SVG content\n const svgContent = ref('')\n\n enum DiagramType {\n Sequence = 'sequenceDiagram',\n Class = 'classDiagram',\n State = 'stateDiagram',\n ER = 'erDiagram',\n XYChart = 'xychart',\n Flowchart = 'flowchart',\n Graph = 'graph',\n }\n\n const diagramType = computed<DiagramType | undefined>(() => {\n const code = toolPart.value.input?.code?.trimStart()\n if (!code) {\n return undefined\n }\n const firstWord = code.match(/^[A-Za-z-]+/)?.[0]\n switch (firstWord) {\n case 'sequenceDiagram':\n return DiagramType.Sequence\n case 'classDiagram':\n return DiagramType.Class\n case 'stateDiagram':\n return DiagramType.State\n case 'erDiagram':\n return DiagramType.ER\n case 'xychart-beta':\n return DiagramType.XYChart\n case 'flowchart':\n return DiagramType.Flowchart\n case 'graph':\n return DiagramType.Graph\n default:\n return undefined\n }\n })\n\n const diagramTypeLabel = computed(() => {\n if (!diagramType.value) {\n return ''\n }\n return $te(`diagram.${diagramType.value}`)\n ? $t(`diagram.${diagramType.value}`)\n : diagramType.value\n })\n\n const diagramTypeIcon = computed(() => {\n switch (diagramType.value) {\n case DiagramType.Sequence:\n return 'ri:timeline-view'\n case DiagramType.Class:\n return 'ri:organization-chart'\n case DiagramType.State:\n return 'ri:organization-chart'\n case DiagramType.ER:\n return 'ri:organization-chart'\n case DiagramType.XYChart:\n return 'ri:line-chart-line'\n case DiagramType.Flowchart:\n return 'ri:flow-chart'\n case DiagramType.Graph:\n return 'ri:flow-chart'\n default:\n return 'ri:flow-chart'\n }\n })\n\n async function renderDiagram() {\n const code = toolPart.value.input?.code\n if (!code) {\n return\n }\n\n svgError.value = false\n try {\n const { renderMermaidSVG, THEMES } =\n await import('beautiful-mermaid')\n const theme = props.isDark\n ? THEMES['github-dark']\n : THEMES['github-light']\n svgContent.value = renderMermaidSVG(code, theme)\n } catch {\n svgError.value = true\n }\n }\n\n watch([() => toolPart.value.input?.code, () => props.isDark], renderDiagram)\n onMounted(async () => {\n await renderDiagram()\n })\n\n const downloadSvg = () => {\n if (!svgContent.value) {\n return\n }\n const blob = new Blob([svgContent.value], {\n type: 'image/svg+xml;charset=utf-8',\n })\n const url = URL.createObjectURL(blob)\n const anchor = document.createElement('a')\n anchor.href = url\n anchor.download = `${toSnakeCase(toolPart.value.input?.title || 'diagram')}.svg`\n document.body.appendChild(anchor)\n anchor.click()\n document.body.removeChild(anchor)\n URL.revokeObjectURL(url)\n }\n\n const copyCode = () => {\n const code = toolPart.value.input?.code\n if (code) {\n copy(code)\n }\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.code\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon :name=\"diagramTypeIcon\" class=\"text-16\" />\n <div class=\"flex flex-col items-start gap-2\">\n <strong class=\"font-bold\">{{\n diagramTypeLabel ?? $t('label.diagram')\n }}</strong>\n </div>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyCode\" />\n <VvButton\n v-if=\"svgContent\"\n modifiers=\"action-quiet-small\"\n icon=\"ri:download-line\"\n :label=\"$t('action.download')\"\n @click=\"downloadSvg\" />\n </VvButtonGroup>\n </div>\n <div v-if=\"svgError\" class=\"text-12 text-danger py-8 px-sm\">\n {{ $t('message.diagramRenderError') }}\n </div>\n <PkSvgViewer\n v-else-if=\"svgContent\"\n class=\"pk-tool-show-diagram__stage\"\n :svg=\"svgContent\"\n :title=\"toolPart.input?.title\" />\n <div\n v-else\n class=\"pk-tool-show-diagram__stage flex justify-center items-center\">\n <VvIcon name=\"loading-loop\" class=\"w-24 h-24 text-word-5\" />\n </div>\n <div\n v-if=\"toolPart.input.caption\"\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-t border-surface-3 text-word-3\">\n {{ toolPart.input.caption }}\n </div>\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-tool-show-diagram {\n // Fixed stage height: the diagram renders lazily (async chunk +\n // dynamic mermaid import), so the loader and the rendered SVG must\n // occupy the same space or the chat scroll position jumps around.\n // The SVG scales to fit; zoom/pan and the lightbox cover the rest.\n &__stage {\n height: 384px;\n\n .pk-svg-viewer__stage,\n .pk-svg-viewer__content {\n height: 100%;\n }\n }\n }\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;GAkCSsB,IAAL,yBAAA,GAAA;QACI,EAAAC,WAAA,mBACA,EAAAC,QAAA,gBACA,EAAAC,QAAA,gBACA,EAAAC,KAAA,aACA,EAAAC,UAAA,WACA,EAAAC,YAAA,aACA,EAAAC,QAAA;AACJ,EARKP,KAAA,CAAA,CAQL;;;;;;;EAnCA,IAAMU,IAAQC,GAKR,EAAE,GAAGC,GAAI,IAAIC,MAAQC,EAAQ,EAC/B,UAAU,SACd,CAAC,GAEK,EAAE,SAAM,cAAWC,EAAa,GAEhCC,IAAWC,QACAP,EAAM,IAQtB,GAEKQ,IAAWC,EAAI,EAAK,GAGpBC,IAAaD,EAAI,EAAE,GAYnBE,IAAcJ,QAAwC;GACxD,IAAMK,IAAON,EAAS,MAAM,OAAO,MAAM,UAAU;GACnD,IAAKM,GAIL,QADkBA,EAAK,MAAM,aAAa,CAAC,GAAG,IAC9C;IACI,KAAK,mBACD,OAAOtB,EAAY;IACvB,KAAK,gBACD,OAAOA,EAAY;IACvB,KAAK,gBACD,OAAOA,EAAY;IACvB,KAAK,aACD,OAAOA,EAAY;IACvB,KAAK,gBACD,OAAOA,EAAY;IACvB,KAAK,aACD,OAAOA,EAAY;IACvB,KAAK,SACD,OAAOA,EAAY;IACvB,SACI;GACR;EACJ,CAAC,GAEKuB,IAAmBN,QAChBI,EAAY,QAGVR,EAAI,WAAWQ,EAAY,OAAO,IACnCT,EAAG,WAAWS,EAAY,OAAO,IACjCA,EAAY,QAJP,EAKd,GAEKG,IAAkBP,QAAe;GACnC,QAAQI,EAAY,OAApB;IACI,KAAKrB,EAAY,UACb,OAAO;IACX,KAAKA,EAAY,OACb,OAAO;IACX,KAAKA,EAAY,OACb,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M;;KACtCzC,EAIM,OAJNY,GAIM,CAHFZ,EAEW,UAFXa,GAEWX,EADPsC,EAAA,SAAoBrC,EAAA0B,CAAA,CAAE,CAAA,eAAA,CAAA,GAAA,CAAA,CAAA,CAAA;KAG9B5B,EAYgByD,GAAA;MAZD,WAAU;MAAU,OAAM;;MACrC,SAAAtD,QAIwB,CAJxBH,EAIwBuD,GAAA;OAHpB,WAAU;OACT,MAAMrD,EAAAgE,CAAA,IAAM,kBAAA;OACZ,OAAOhE,EAAAgE,CAAA,IAAShE,EAAA0B,CAAA,CAAE,CAAA,eAAA,IAAoB1B,EAAA0B,CAAA,CAAE,CAAA,aAAA;OACxC,SAAOuB;MAEF,GAAA,MAAA,GAAA,CAAA,QAAA,OAAA,CAAA,GAAAf,EAAA,SADVvC,EAAA,GAAAO,EAK2BmD,GAAA;;OAHvB,WAAU;OACV,MAAK;OACJ,OAAOrD,EAAA0B,CAAA,CAAE,CAAA,iBAAA;OACT,SAAOmB;;;;;IAGTb,EAAA,SAAXrC,EAAA,GAAAC,EAEM,OAFNe,GAEMZ,EADCC,EAAA0B,CAAA,CAAE,CAAA,4BAAA,CAAA,GAAA,CAAA,KAGMQ,EAAA,SADfvC,EAAA,GAAAO,EAIqCE,GAAA;;KAFjC,OAAM;KACL,KAAK8B,EAAA;KACL,OAAOJ,EAAA,MAAS,OAAO;IAC5BnC,GAAAA,MAAAA,GAAAA,CAAAA,OAAAA,OAAAA,CAAAA,MAAAA,EAAA,GAAAC,EAIM,OAJNgB,GAIM,CADFd,EAA4DqD,GAAA;KAApD,MAAK;KAAe,OAAM;;IAG5BrB,EAAA,MAAS,MAAM,WADzBnC,EAAA,GAAAC,EAIM,OAJNiB,GAIMd,EADC+B,EAAA,MAAS,MAAM,OAAO,GAAA,CAAA,KAAAoC,EAAA,IAAA,EAAA"}
|
|
1
|
+
{"version":3,"file":"PkToolShowDiagram-CR-TthJm.js","names":["__unplugin_components_0","__unplugin_components_1","__unplugin_components_2","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_toDisplayString","_unref","_withCtx","_createBlock","_createCommentVNode","PkSvgViewer","_sfc_main","toSnakeCase","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","DiagramType","\"Sequence\"","\"Class\"","\"State\"","\"ER\"","\"XYChart\"","\"Flowchart\"","\"Graph\"","PkToolShowDiagram_default","defineComponent","props","__props","$t","$te","useI18n","useClipboard","toolPart","computed","svgError","ref","svgContent","diagramType","code","diagramTypeLabel","diagramTypeIcon","renderDiagram","theme","THEMES","renderMermaidSVG","watch","onMounted","downloadSvg","blob","url","anchor","copyCode","copy","_component_VvIcon","VvIcon","_component_VvButton","VvButton","_component_VvButtonGroup","VvButtonGroup","openBlock","createElementBlock","createElementVNode","createVNode","toDisplayString","unref","withCtx","copied","createBlock","createCommentVNode","PkSvgViewer_default"],"sources":["../../../../packages/components/src/chat/PkToolShowDiagram.vue","../../../../packages/components/src/chat/PkToolShowDiagram.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, onMounted, ref, watch } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useI18n } from 'vue-i18n'\n import { toSnakeCase } from 'utils'\n import PkSvgViewer from '../PkSvgViewer.vue'\n\n const props = defineProps<{\n part: unknown\n isDark?: boolean\n }>()\n\n const { t: $t, te: $te } = useI18n({\n useScope: 'global',\n })\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n code: string\n title?: string\n caption?: string\n }\n }\n return part\n })\n\n const svgError = ref(false)\n\n // Serialized SVG content\n const svgContent = ref('')\n\n enum DiagramType {\n Sequence = 'sequenceDiagram',\n Class = 'classDiagram',\n State = 'stateDiagram',\n ER = 'erDiagram',\n XYChart = 'xychart',\n Flowchart = 'flowchart',\n Graph = 'graph',\n }\n\n const diagramType = computed<DiagramType | undefined>(() => {\n const code = toolPart.value.input?.code?.trimStart()\n if (!code) {\n return undefined\n }\n const firstWord = code.match(/^[A-Za-z-]+/)?.[0]\n switch (firstWord) {\n case 'sequenceDiagram':\n return DiagramType.Sequence\n case 'classDiagram':\n return DiagramType.Class\n case 'stateDiagram':\n return DiagramType.State\n case 'erDiagram':\n return DiagramType.ER\n case 'xychart-beta':\n return DiagramType.XYChart\n case 'flowchart':\n return DiagramType.Flowchart\n case 'graph':\n return DiagramType.Graph\n default:\n return undefined\n }\n })\n\n const diagramTypeLabel = computed(() => {\n if (!diagramType.value) {\n return ''\n }\n return $te(`diagram.${diagramType.value}`)\n ? $t(`diagram.${diagramType.value}`)\n : diagramType.value\n })\n\n const diagramTypeIcon = computed(() => {\n switch (diagramType.value) {\n case DiagramType.Sequence:\n return 'ri:timeline-view'\n case DiagramType.Class:\n return 'ri:organization-chart'\n case DiagramType.State:\n return 'ri:organization-chart'\n case DiagramType.ER:\n return 'ri:organization-chart'\n case DiagramType.XYChart:\n return 'ri:line-chart-line'\n case DiagramType.Flowchart:\n return 'ri:flow-chart'\n case DiagramType.Graph:\n return 'ri:flow-chart'\n default:\n return 'ri:flow-chart'\n }\n })\n\n async function renderDiagram() {\n const code = toolPart.value.input?.code\n if (!code) {\n return\n }\n\n svgError.value = false\n try {\n const { renderMermaidSVG, THEMES } =\n await import('beautiful-mermaid')\n const theme = props.isDark\n ? THEMES['github-dark']\n : THEMES['github-light']\n svgContent.value = renderMermaidSVG(code, theme)\n } catch {\n svgError.value = true\n }\n }\n\n watch([() => toolPart.value.input?.code, () => props.isDark], renderDiagram)\n onMounted(async () => {\n await renderDiagram()\n })\n\n const downloadSvg = () => {\n if (!svgContent.value) {\n return\n }\n const blob = new Blob([svgContent.value], {\n type: 'image/svg+xml;charset=utf-8',\n })\n const url = URL.createObjectURL(blob)\n const anchor = document.createElement('a')\n anchor.href = url\n anchor.download = `${toSnakeCase(toolPart.value.input?.title || 'diagram')}.svg`\n document.body.appendChild(anchor)\n anchor.click()\n document.body.removeChild(anchor)\n URL.revokeObjectURL(url)\n }\n\n const copyCode = () => {\n const code = toolPart.value.input?.code\n if (code) {\n copy(code)\n }\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.code\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon :name=\"diagramTypeIcon\" class=\"text-16\" />\n <div class=\"flex flex-col items-start gap-2\">\n <strong class=\"font-bold\">{{\n diagramTypeLabel ?? $t('label.diagram')\n }}</strong>\n </div>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyCode\" />\n <VvButton\n v-if=\"svgContent\"\n modifiers=\"action-quiet-small\"\n icon=\"ri:download-line\"\n :label=\"$t('action.download')\"\n @click=\"downloadSvg\" />\n </VvButtonGroup>\n </div>\n <div v-if=\"svgError\" class=\"text-12 text-danger py-8 px-sm\">\n {{ $t('message.diagramRenderError') }}\n </div>\n <PkSvgViewer\n v-else-if=\"svgContent\"\n class=\"pk-tool-show-diagram__stage\"\n :svg=\"svgContent\"\n :title=\"toolPart.input?.title\" />\n <div\n v-else\n class=\"pk-tool-show-diagram__stage flex justify-center items-center\">\n <VvIcon name=\"loading-loop\" class=\"w-24 h-24 text-word-5\" />\n </div>\n <div\n v-if=\"toolPart.input.caption\"\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-t border-surface-3 text-word-3\">\n {{ toolPart.input.caption }}\n </div>\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-tool-show-diagram {\n // Fixed stage height: the diagram renders lazily (async chunk +\n // dynamic mermaid import), so the loader and the rendered SVG must\n // occupy the same space or the chat scroll position jumps around.\n // The SVG scales to fit; zoom/pan and the lightbox cover the rest.\n &__stage {\n height: 384px;\n\n .pk-svg-viewer__stage,\n .pk-svg-viewer__content {\n height: 100%;\n }\n }\n }\n</style>\n","<script setup lang=\"ts\">\n import { computed, onMounted, ref, watch } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useI18n } from 'vue-i18n'\n import { toSnakeCase } from 'utils'\n import PkSvgViewer from '../PkSvgViewer.vue'\n\n const props = defineProps<{\n part: unknown\n isDark?: boolean\n }>()\n\n const { t: $t, te: $te } = useI18n({\n useScope: 'global',\n })\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n code: string\n title?: string\n caption?: string\n }\n }\n return part\n })\n\n const svgError = ref(false)\n\n // Serialized SVG content\n const svgContent = ref('')\n\n enum DiagramType {\n Sequence = 'sequenceDiagram',\n Class = 'classDiagram',\n State = 'stateDiagram',\n ER = 'erDiagram',\n XYChart = 'xychart',\n Flowchart = 'flowchart',\n Graph = 'graph',\n }\n\n const diagramType = computed<DiagramType | undefined>(() => {\n const code = toolPart.value.input?.code?.trimStart()\n if (!code) {\n return undefined\n }\n const firstWord = code.match(/^[A-Za-z-]+/)?.[0]\n switch (firstWord) {\n case 'sequenceDiagram':\n return DiagramType.Sequence\n case 'classDiagram':\n return DiagramType.Class\n case 'stateDiagram':\n return DiagramType.State\n case 'erDiagram':\n return DiagramType.ER\n case 'xychart-beta':\n return DiagramType.XYChart\n case 'flowchart':\n return DiagramType.Flowchart\n case 'graph':\n return DiagramType.Graph\n default:\n return undefined\n }\n })\n\n const diagramTypeLabel = computed(() => {\n if (!diagramType.value) {\n return ''\n }\n return $te(`diagram.${diagramType.value}`)\n ? $t(`diagram.${diagramType.value}`)\n : diagramType.value\n })\n\n const diagramTypeIcon = computed(() => {\n switch (diagramType.value) {\n case DiagramType.Sequence:\n return 'ri:timeline-view'\n case DiagramType.Class:\n return 'ri:organization-chart'\n case DiagramType.State:\n return 'ri:organization-chart'\n case DiagramType.ER:\n return 'ri:organization-chart'\n case DiagramType.XYChart:\n return 'ri:line-chart-line'\n case DiagramType.Flowchart:\n return 'ri:flow-chart'\n case DiagramType.Graph:\n return 'ri:flow-chart'\n default:\n return 'ri:flow-chart'\n }\n })\n\n async function renderDiagram() {\n const code = toolPart.value.input?.code\n if (!code) {\n return\n }\n\n svgError.value = false\n try {\n const { renderMermaidSVG, THEMES } =\n await import('beautiful-mermaid')\n const theme = props.isDark\n ? THEMES['github-dark']\n : THEMES['github-light']\n svgContent.value = renderMermaidSVG(code, theme)\n } catch {\n svgError.value = true\n }\n }\n\n watch([() => toolPart.value.input?.code, () => props.isDark], renderDiagram)\n onMounted(async () => {\n await renderDiagram()\n })\n\n const downloadSvg = () => {\n if (!svgContent.value) {\n return\n }\n const blob = new Blob([svgContent.value], {\n type: 'image/svg+xml;charset=utf-8',\n })\n const url = URL.createObjectURL(blob)\n const anchor = document.createElement('a')\n anchor.href = url\n anchor.download = `${toSnakeCase(toolPart.value.input?.title || 'diagram')}.svg`\n document.body.appendChild(anchor)\n anchor.click()\n document.body.removeChild(anchor)\n URL.revokeObjectURL(url)\n }\n\n const copyCode = () => {\n const code = toolPart.value.input?.code\n if (code) {\n copy(code)\n }\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.code\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon :name=\"diagramTypeIcon\" class=\"text-16\" />\n <div class=\"flex flex-col items-start gap-2\">\n <strong class=\"font-bold\">{{\n diagramTypeLabel ?? $t('label.diagram')\n }}</strong>\n </div>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyCode\" />\n <VvButton\n v-if=\"svgContent\"\n modifiers=\"action-quiet-small\"\n icon=\"ri:download-line\"\n :label=\"$t('action.download')\"\n @click=\"downloadSvg\" />\n </VvButtonGroup>\n </div>\n <div v-if=\"svgError\" class=\"text-12 text-danger py-8 px-sm\">\n {{ $t('message.diagramRenderError') }}\n </div>\n <PkSvgViewer\n v-else-if=\"svgContent\"\n class=\"pk-tool-show-diagram__stage\"\n :svg=\"svgContent\"\n :title=\"toolPart.input?.title\" />\n <div\n v-else\n class=\"pk-tool-show-diagram__stage flex justify-center items-center\">\n <VvIcon name=\"loading-loop\" class=\"w-24 h-24 text-word-5\" />\n </div>\n <div\n v-if=\"toolPart.input.caption\"\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-t border-surface-3 text-word-3\">\n {{ toolPart.input.caption }}\n </div>\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-tool-show-diagram {\n // Fixed stage height: the diagram renders lazily (async chunk +\n // dynamic mermaid import), so the loader and the rendered SVG must\n // occupy the same space or the chat scroll position jumps around.\n // The SVG scales to fit; zoom/pan and the lightbox cover the rest.\n &__stage {\n height: 384px;\n\n .pk-svg-viewer__stage,\n .pk-svg-viewer__content {\n height: 100%;\n }\n }\n }\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;GAkCSsB,IAAL,yBAAA,GAAA;QACI,EAAAC,WAAA,mBACA,EAAAC,QAAA,gBACA,EAAAC,QAAA,gBACA,EAAAC,KAAA,aACA,EAAAC,UAAA,WACA,EAAAC,YAAA,aACA,EAAAC,QAAA;AACJ,EARKP,KAAA,CAAA,CAQL;;;;;;;EAnCA,IAAMU,IAAQC,GAKR,EAAE,GAAGC,GAAI,IAAIC,MAAQC,EAAQ,EAC/B,UAAU,SACd,CAAC,GAEK,EAAE,SAAM,cAAWC,EAAa,GAEhCC,IAAWC,QACAP,EAAM,IAQtB,GAEKQ,IAAWC,EAAI,EAAK,GAGpBC,IAAaD,EAAI,EAAE,GAYnBE,IAAcJ,QAAwC;GACxD,IAAMK,IAAON,EAAS,MAAM,OAAO,MAAM,UAAU;GACnD,IAAKM,GAIL,QADkBA,EAAK,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AA,GAAA,CAAA,KAGMQ,EAAA,SADfvC,EAAA,GAAAO,EAIqCE,GAAA;;KAFjC,OAAM;KACL,KAAK8B,EAAA;KACL,OAAOJ,EAAA,MAAS,OAAO;IAC5BnC,GAAAA,MAAAA,GAAAA,CAAAA,OAAAA,OAAAA,CAAAA,MAAAA,EAAA,GAAAC,EAIM,OAJNgB,GAIM,CADFd,EAA4DqD,GAAA;KAApD,MAAK;KAAe,OAAM;;IAG5BrB,EAAA,MAAS,MAAM,WADzBnC,EAAA,GAAAC,EAIM,OAJNiB,GAIMd,EADC+B,EAAA,MAAS,MAAM,OAAO,GAAA,CAAA,KAAAoC,EAAA,IAAA,EAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { k as t } from "./Agent-
|
|
3
|
-
import { t as n } from "./PkStreamingMarkdown-
|
|
4
|
-
import { c as r, s as i } from "./utils-
|
|
2
|
+
import { k as t } from "./Agent-iJ7nRWUV.js";
|
|
3
|
+
import { t as n } from "./PkStreamingMarkdown-CCu2pX2c.js";
|
|
4
|
+
import { c as r, s as i } from "./utils-wUVFCJMG.js";
|
|
5
5
|
import { VvButton as a, VvCheckbox as o, VvCheckboxGroup as s, VvIcon as ee, VvInputText as te, VvRadio as c, VvRadioGroup as l } from "@volverjs/ui-vue/components";
|
|
6
6
|
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createSlots as g, createTextVNode as _, createVNode as v, defineComponent as y, mergeModels as b, mergeProps as x, normalizeClass as ne, normalizeStyle as re, openBlock as S, reactive as ie, ref as C, renderList as w, renderSlot as T, toDisplayString as E, unref as D, useId as O, useModel as k, watch as A, withCtx as j, withKeys as ae, withModifiers as M } from "vue";
|
|
7
7
|
import { useI18n as oe } from "vue-i18n";
|
|
@@ -137,22 +137,22 @@ var N = /* @__PURE__ */ y({
|
|
|
137
137
|
}, ue = {
|
|
138
138
|
key: 1,
|
|
139
139
|
class: "flex flex-col gap-4 p-sm"
|
|
140
|
-
}, de = { class: "flex justify-between text-10 text-word-3" }, fe = { class: "h-4 bg-surface-3 rounded-full overflow-hidden" }, pe = { class: "px-sm py-16 flex flex-col gap-12" }, me = { class: "leading-normal text-12" }, he =
|
|
140
|
+
}, de = { class: "flex justify-between text-10 text-word-3" }, fe = { class: "h-4 bg-surface-3 rounded-full overflow-hidden" }, pe = { class: "px-sm py-16 flex flex-col gap-12" }, me = { class: "leading-normal text-12" }, he = ["id"], ge = { class: "text-12" }, _e = { class: "font-semibold" }, ve = {
|
|
141
141
|
key: 0,
|
|
142
142
|
class: "text-word-3"
|
|
143
|
-
},
|
|
143
|
+
}, F = { class: "text-12" }, ye = { class: "font-semibold" }, be = {
|
|
144
144
|
key: 0,
|
|
145
145
|
class: "text-word-3"
|
|
146
|
-
},
|
|
146
|
+
}, xe = {
|
|
147
147
|
key: 2,
|
|
148
148
|
class: "flex flex-col gap-6 w-full"
|
|
149
|
-
},
|
|
149
|
+
}, Se = {
|
|
150
150
|
key: 0,
|
|
151
151
|
class: "px-sm pb-sm border-t border-surface-3"
|
|
152
|
-
},
|
|
152
|
+
}, Ce = {
|
|
153
153
|
key: 1,
|
|
154
154
|
class: "px-sm py-10 bg-surface border-t border-surface-3 flex justify-between gap-12"
|
|
155
|
-
},
|
|
155
|
+
}, we = { key: 1 }, Te = { class: "px-sm py-12 bg-surface flex flex-col gap-10" }, Ee = { class: "flex flex-col gap-8" }, De = { class: "text-12 text-word-3" }, Oe = { class: "text-12 text-word-2 font-semibold" }, ke = { class: "px-sm py-12 bg-surface border-t border-surface-3 flex items-center gap-10" }, Ae = { class: "flex flex-col" }, je = { class: "font-medium text-12 text-word-1 leading-tight" }, I = /*@__PURE__*/ y({
|
|
156
156
|
__name: "PkToolShowForm",
|
|
157
157
|
props: {
|
|
158
158
|
part: {},
|
|
@@ -161,201 +161,211 @@ var N = /* @__PURE__ */ y({
|
|
|
161
161
|
},
|
|
162
162
|
emits: ["select"],
|
|
163
163
|
setup(e, { emit: o }) {
|
|
164
|
-
let s = e, c = o, { t: l, d: _ } = oe({ useScope: "global" }), y = d(() => JSON.parse(JSON.stringify(s.part))), b = d(() => y.value.toolName === "showMultipleChoice" || y.value.type === "tool-showMultipleChoice"),
|
|
165
|
-
let e =
|
|
164
|
+
let s = e, c = o, { t: l, d: _ } = oe({ useScope: "global" }), y = d(() => JSON.parse(JSON.stringify(s.part))), b = O(), x = d(() => y.value.toolName === "showMultipleChoice" || y.value.type === "tool-showMultipleChoice"), T = d(() => t(y.value.output)), k = d(() => !s.answered && (y.value.state === "input-available" || T.value)), I = d(() => {
|
|
165
|
+
let e = V.value;
|
|
166
166
|
return e ? z.value.length === 1 && !e.allowFreeformInput && !s.allowCustomAnswer : !1;
|
|
167
|
-
}),
|
|
167
|
+
}), L = d(() => x.value && z.value.length === 1 && !V.value?.multiSelect), R = d(() => !!V.value?.options && !V.value?.multiSelect && (I.value || L.value)), z = d(() => {
|
|
168
168
|
let e = y.value.input;
|
|
169
169
|
return e?.steps?.length ? e.steps : e?.question && e?.options ? [{
|
|
170
170
|
id: "legacy",
|
|
171
171
|
question: e.question,
|
|
172
172
|
options: e.options.map((e) => typeof e == "string" ? { label: e } : e)
|
|
173
173
|
}] : [];
|
|
174
|
-
}),
|
|
175
|
-
A(
|
|
176
|
-
|
|
174
|
+
}), Me = d(() => y.value.state === "output-error" && !z.value.length), B = C(0), V = d(() => z.value[B.value]), H = d(() => B.value > 0), U = d(() => B.value < z.value.length - 1), Ne = d(() => z.value.length > 1), W = d(() => Ne.value ? Math.round((B.value + 1) / z.value.length * 100) : null), G = ie({}), K = C("");
|
|
175
|
+
A(B, () => {
|
|
176
|
+
K.value = "";
|
|
177
177
|
});
|
|
178
|
-
let
|
|
178
|
+
let q = d({
|
|
179
179
|
get: () => {
|
|
180
|
-
let e =
|
|
180
|
+
let e = V.value ? G[B.value] : void 0;
|
|
181
181
|
if (!(e == null || Array.isArray(e))) return e;
|
|
182
182
|
},
|
|
183
183
|
set: (e) => {
|
|
184
|
-
|
|
184
|
+
V.value && (G[B.value] = e ?? null);
|
|
185
185
|
}
|
|
186
|
-
}),
|
|
186
|
+
}), J = d({
|
|
187
187
|
get: () => {
|
|
188
|
-
let e =
|
|
188
|
+
let e = V.value ? G[B.value] : void 0;
|
|
189
189
|
return Array.isArray(e) ? e : [];
|
|
190
190
|
},
|
|
191
191
|
set: (e) => {
|
|
192
|
-
|
|
192
|
+
V.value && (G[B.value] = e ?? []);
|
|
193
193
|
}
|
|
194
194
|
});
|
|
195
|
-
function
|
|
195
|
+
function Pe(e) {
|
|
196
196
|
if (!e || typeof e == "string") return;
|
|
197
197
|
let t = e.answers;
|
|
198
198
|
return Array.isArray(t) ? t : void 0;
|
|
199
199
|
}
|
|
200
200
|
A(() => y.value.output, (e) => {
|
|
201
|
-
e && !t(e) && Object.assign(
|
|
201
|
+
e && !t(e) && Object.assign(G, i(z.value, e));
|
|
202
202
|
}, { immediate: !0 });
|
|
203
|
-
let
|
|
203
|
+
let Y = d(() => {
|
|
204
204
|
let e = y.value.output;
|
|
205
205
|
if (!e || t(e)) return;
|
|
206
206
|
if (typeof e == "string") return e;
|
|
207
|
-
let n =
|
|
207
|
+
let n = Pe(e);
|
|
208
208
|
if (n?.length === 1) {
|
|
209
209
|
let e = n[0].value;
|
|
210
210
|
return Array.isArray(e) ? e.join(", ") : String(e);
|
|
211
211
|
}
|
|
212
212
|
});
|
|
213
|
-
A(
|
|
214
|
-
e &&
|
|
213
|
+
A(Y, (e) => {
|
|
214
|
+
e && V.value && ((V.value.options ?? []).map((e) => e.label).includes(e) || (K.value = e));
|
|
215
215
|
}, { immediate: !0 });
|
|
216
|
-
let X = d(() => r(
|
|
216
|
+
let X = d(() => r(V.value));
|
|
217
217
|
function Z() {
|
|
218
|
-
|
|
218
|
+
K.value.trim() ? $() : U.value ? B.value++ : Q();
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
|
|
220
|
+
function Fe() {
|
|
221
|
+
H.value && B.value--;
|
|
222
222
|
}
|
|
223
223
|
function Q() {
|
|
224
|
-
if (!
|
|
224
|
+
if (!k.value) return;
|
|
225
225
|
let e = z.value.map((e, t) => ({
|
|
226
226
|
id: e.id,
|
|
227
|
-
value:
|
|
227
|
+
value: G[t] ?? null
|
|
228
228
|
}));
|
|
229
|
-
if (
|
|
229
|
+
if (L.value && !V.value?.allowFreeformInput) {
|
|
230
230
|
let t = e[0].value;
|
|
231
231
|
c("select", Array.isArray(t) ? t[0] : t);
|
|
232
232
|
} else c("select", { answers: e });
|
|
233
233
|
}
|
|
234
234
|
function $() {
|
|
235
|
-
let e =
|
|
236
|
-
e && (
|
|
235
|
+
let e = K.value.trim();
|
|
236
|
+
e && (G[B.value] = e, K.value = "", z.value.length === 1 ? Q() : Z());
|
|
237
237
|
}
|
|
238
|
-
function
|
|
239
|
-
|
|
238
|
+
function Ie() {
|
|
239
|
+
k.value && (I.value || L.value) && Q();
|
|
240
240
|
}
|
|
241
|
-
function
|
|
242
|
-
let n =
|
|
241
|
+
function Le(e, t) {
|
|
242
|
+
let n = G[t];
|
|
243
243
|
return n == null ? "—" : Array.isArray(n) ? n.join(", ") : e.type === "date" ? _(new Date(n), "short") : n;
|
|
244
244
|
}
|
|
245
245
|
return (e, t) => {
|
|
246
|
-
let r =
|
|
247
|
-
return
|
|
246
|
+
let r = ee, i = te, o = a;
|
|
247
|
+
return Me.value ? (S(), m("div", se, [v(r, {
|
|
248
|
+
name: "ri:error-warning-line",
|
|
249
|
+
class: "w-16 h-16 shrink-0"
|
|
250
|
+
}), h("span", null, E(D(l)("message.formRenderError")), 1)])) : z.value.length ? (S(), m("div", ce, [y.value.input?.title || k.value && z.value.length > 1 ? (S(), m("div", le, [y.value.input?.title ? (S(), m("div", {
|
|
248
251
|
key: 0,
|
|
249
|
-
class: ne(["px-sm py-10 font-bold", { "border-b border-surface-3":
|
|
250
|
-
}, E(y.value.input?.title), 3)) : p("", !0),
|
|
251
|
-
current:
|
|
252
|
+
class: ne(["px-sm py-10 font-bold", { "border-b border-surface-3": k.value && z.value.length > 1 }])
|
|
253
|
+
}, E(y.value.input?.title), 3)) : p("", !0), k.value && z.value.length > 1 ? (S(), m("div", ue, [h("div", de, [h("span", null, E(D(l)("showForm.step", {
|
|
254
|
+
current: B.value + 1,
|
|
252
255
|
total: z.value.length
|
|
253
|
-
})), 1), h("span", null, E(
|
|
256
|
+
})), 1), h("span", null, E(W.value) + "%", 1)]), h("div", fe, [h("div", {
|
|
254
257
|
class: "h-full bg-word-4 transition-all duration-300",
|
|
255
|
-
style: re({ width: `${
|
|
256
|
-
}, null, 4)])])) : p("", !0)])) : p("", !0),
|
|
257
|
-
h("div", pe, [h("div", me, [h("strong",
|
|
258
|
+
style: re({ width: `${W.value}%` })
|
|
259
|
+
}, null, 4)])])) : p("", !0)])) : p("", !0), k.value ? (S(), m(u, { key: 1 }, [
|
|
260
|
+
h("div", pe, [h("div", me, [h("strong", {
|
|
261
|
+
id: D(b),
|
|
262
|
+
class: "font-semibold"
|
|
263
|
+
}, E(V.value.question), 9, he), V.value.message ? (S(), f(n, {
|
|
258
264
|
key: 0,
|
|
259
|
-
markdown:
|
|
265
|
+
markdown: V.value.message,
|
|
260
266
|
class: "text-word-2 mt-4"
|
|
261
|
-
}, null, 8, ["markdown"])) : p("", !0)]),
|
|
267
|
+
}, null, 8, ["markdown"])) : p("", !0)]), V.value.options && V.value.multiSelect ? (S(), f(P, {
|
|
262
268
|
key: 0,
|
|
263
|
-
modelValue:
|
|
264
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
265
|
-
name:
|
|
269
|
+
modelValue: J.value,
|
|
270
|
+
"onUpdate:modelValue": t[0] ||= (e) => J.value = e,
|
|
271
|
+
name: V.value.id,
|
|
266
272
|
options: X.value,
|
|
267
|
-
readonly: !
|
|
273
|
+
readonly: !k.value,
|
|
268
274
|
class: "mb-0",
|
|
269
275
|
vertical: ""
|
|
270
276
|
}, g({ _: 2 }, [w(X.value, (e) => ({
|
|
271
277
|
name: e.value,
|
|
272
|
-
fn: j(() => [h("div", ge, [h("div", _e, E(e.label), 1), e.description ? (S(), m("div",
|
|
278
|
+
fn: j(() => [h("div", ge, [h("div", _e, E(e.label), 1), e.description ? (S(), m("div", ve, E(e.description), 1)) : p("", !0)])])
|
|
273
279
|
}))]), 1032, [
|
|
274
280
|
"modelValue",
|
|
275
281
|
"name",
|
|
276
282
|
"options",
|
|
277
283
|
"readonly"
|
|
278
|
-
])) :
|
|
284
|
+
])) : V.value.options && !V.value.multiSelect ? (S(), f(N, {
|
|
279
285
|
key: 1,
|
|
280
|
-
modelValue:
|
|
281
|
-
"onUpdate:modelValue": [t[1] ||= (e) =>
|
|
282
|
-
name:
|
|
286
|
+
modelValue: q.value,
|
|
287
|
+
"onUpdate:modelValue": [t[1] ||= (e) => q.value = e, Ie],
|
|
288
|
+
name: V.value.id,
|
|
283
289
|
options: X.value,
|
|
284
|
-
readonly: !
|
|
290
|
+
readonly: !k.value,
|
|
285
291
|
vertical: "",
|
|
286
292
|
class: "mb-0"
|
|
287
293
|
}, g({ _: 2 }, [w(X.value, (e) => ({
|
|
288
294
|
name: e.value,
|
|
289
|
-
fn: j(() => [h("div",
|
|
295
|
+
fn: j(() => [h("div", F, [h("div", ye, E(e.label), 1), e.description ? (S(), m("div", be, E(e.description), 1)) : p("", !0)])])
|
|
290
296
|
}))]), 1032, [
|
|
291
297
|
"modelValue",
|
|
292
298
|
"name",
|
|
293
299
|
"options",
|
|
294
300
|
"readonly"
|
|
295
|
-
])) :
|
|
296
|
-
key:
|
|
297
|
-
modelValue:
|
|
298
|
-
"onUpdate:modelValue": t[2] ||= (e) =>
|
|
299
|
-
|
|
300
|
-
|
|
301
|
+
])) : V.value.options ? p("", !0) : (S(), m("div", xe, [(S(), f(i, {
|
|
302
|
+
key: V.value.id,
|
|
303
|
+
modelValue: q.value,
|
|
304
|
+
"onUpdate:modelValue": t[2] ||= (e) => q.value = e,
|
|
305
|
+
"aria-labelledby": D(b),
|
|
306
|
+
placeholder: V.value.placeholder || D(l)("placeholder.insert"),
|
|
307
|
+
type: V.value.type,
|
|
301
308
|
class: "w-full",
|
|
302
|
-
name:
|
|
309
|
+
name: V.value.id,
|
|
303
310
|
modifiers: "compact",
|
|
304
|
-
disabled: !
|
|
311
|
+
disabled: !k.value,
|
|
305
312
|
onKeyup: ae(Z, ["enter"])
|
|
306
313
|
}, null, 8, [
|
|
307
314
|
"modelValue",
|
|
315
|
+
"aria-labelledby",
|
|
308
316
|
"placeholder",
|
|
309
317
|
"type",
|
|
310
318
|
"name",
|
|
311
319
|
"disabled"
|
|
312
320
|
]))]))]),
|
|
313
|
-
|
|
321
|
+
V.value.allowFreeformInput && V.value.options ? (S(), m("div", Se, [h("form", {
|
|
314
322
|
class: "flex gap-xs pt-sm",
|
|
315
323
|
onSubmit: M($, ["prevent"])
|
|
316
|
-
}, [(S(), f(
|
|
317
|
-
key: `${
|
|
318
|
-
modelValue:
|
|
319
|
-
"onUpdate:modelValue": t[3] ||= (e) =>
|
|
324
|
+
}, [(S(), f(i, {
|
|
325
|
+
key: `${V.value.id}-custom`,
|
|
326
|
+
modelValue: K.value,
|
|
327
|
+
"onUpdate:modelValue": t[3] ||= (e) => K.value = e,
|
|
320
328
|
class: "flex-1",
|
|
321
|
-
name: `${
|
|
329
|
+
name: `${V.value.id}-custom`,
|
|
322
330
|
modifiers: "compact",
|
|
323
|
-
disabled: !
|
|
324
|
-
|
|
331
|
+
disabled: !k.value,
|
|
332
|
+
"aria-label": V.value.placeholder || D(l)("showForm.otherPlaceholder"),
|
|
333
|
+
placeholder: V.value.placeholder || D(l)("showForm.otherPlaceholder")
|
|
325
334
|
}, null, 8, [
|
|
326
335
|
"modelValue",
|
|
327
336
|
"name",
|
|
328
337
|
"disabled",
|
|
338
|
+
"aria-label",
|
|
329
339
|
"placeholder"
|
|
330
340
|
]))], 32)])) : p("", !0),
|
|
331
|
-
R.value ? p("", !0) : (S(), m("div",
|
|
341
|
+
R.value ? p("", !0) : (S(), m("div", Ce, [H.value ? (S(), f(o, {
|
|
332
342
|
key: 0,
|
|
333
343
|
modifiers: "action-quiet",
|
|
334
344
|
icon: "ri:arrow-left-s-line",
|
|
335
345
|
label: D(l)("action.back"),
|
|
336
|
-
onClick: M(
|
|
337
|
-
}, null, 8, ["label"])) : (S(), m("div",
|
|
338
|
-
modifiers:
|
|
339
|
-
icon:
|
|
346
|
+
onClick: M(Fe, ["stop"])
|
|
347
|
+
}, null, 8, ["label"])) : (S(), m("div", we)), v(o, {
|
|
348
|
+
modifiers: U.value ? "action-quiet" : "action-primary",
|
|
349
|
+
icon: U.value ? "ri:arrow-right-s-line" : "ri:send-plane-2-line",
|
|
340
350
|
"icon-position": "right",
|
|
341
|
-
label:
|
|
351
|
+
label: U.value ? D(l)("action.next") : D(l)("action.submit"),
|
|
342
352
|
onClick: M(Z, ["stop"])
|
|
343
353
|
}, null, 8, [
|
|
344
354
|
"modifiers",
|
|
345
355
|
"icon",
|
|
346
356
|
"label"
|
|
347
357
|
])]))
|
|
348
|
-
], 64)) : (S(), m(u, { key: 2 }, [h("div",
|
|
358
|
+
], 64)) : (S(), m(u, { key: 2 }, [h("div", Te, [h("ul", Ee, [(S(!0), m(u, null, w(z.value, (e, t) => (S(), m("li", {
|
|
349
359
|
key: t,
|
|
350
360
|
class: "leading-normal"
|
|
351
|
-
}, [h("div",
|
|
361
|
+
}, [h("div", De, E(e.question), 1), h("span", Oe, E(Le(e, t)), 1)]))), 128))])]), h("div", ke, [v(r, {
|
|
352
362
|
name: "ri:check-line",
|
|
353
363
|
class: "text-16 text-success"
|
|
354
|
-
}), h("div",
|
|
364
|
+
}), h("div", Ae, [h("span", je, E(D(l)("showForm.completed")), 1)])])], 64))])) : p("", !0);
|
|
355
365
|
};
|
|
356
366
|
}
|
|
357
|
-
}),
|
|
367
|
+
}), L = /* @__PURE__ */ e({ default: () => R }), R = I;
|
|
358
368
|
//#endregion
|
|
359
|
-
export { N as i,
|
|
369
|
+
export { N as i, L as n, P as r, R as t };
|
|
360
370
|
|
|
361
|
-
//# sourceMappingURL=PkToolShowForm-
|
|
371
|
+
//# sourceMappingURL=PkToolShowForm-BDaYT4E0.js.map
|